Skip to content

feat(logs-view): manage logs saved views as code - #96

Open
pl wants to merge 3 commits into
pl/spec-migrationfrom
pl/resource-logs-views
Open

feat(logs-view): manage logs saved views as code#96
pl wants to merge 3 commits into
pl/spec-migrationfrom
pl/resource-logs-views

Conversation

@pl

@pl pl commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Adds logs views (projects/{id}/logs/views) as a managed resource.

Design

  • Identity carrier: trailing HTML-comment marker in name (the subscriptions pattern) — the API exposes no tags/description, and name is the only free-text field (maxLength 400, generous budget). A validation guard fails fast if name + marker exceeds 400.
  • Addressing: server-assigned short_id (like session-recording playlists).
  • Round-trip (live-verified on 806): filters/columns/pinned round-trip as passthrough; description/name/tags extras are silently dropped by the create serializer. Real PATCH update (HTTP 200) and real DELETE (204).
  • Order: columns carry array-index order; hashed positionally.

Verification (dev project 806)

create → no-op re-apply (clean) → edit → single update → no-op after edit → orphan left untouched → hand-built row (no marker) invisible to plan/orphans (safety invariant) → scoped prune via direct pruneLogsView call. All rows cleaned up. Gates: typecheck, typecheck:examples, test (303), lint all pass. Logs-views smoke seed verified in isolation (seed→apply→pull --all-rows→tag-back→dry-run no-op→cleanup).

Stacking

Stacks on #81 (pl/spec-migration) — the codegen-only base branch. Retarget to master when #81 merges. First commit is the codegen regen (skippable in review). The docs/resources.md Logs rows are provisional ahead of the full matrix refresh (#78).

🤖 Generated with Claude Code

pl and others added 3 commits July 24, 2026 01:23
Add logs_views list/create/retrieve/update/partial_update/destroy to the
openapi-filter allowlist and regenerate src/generated/api.d.ts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Manage logs saved views (projects/{id}/logs/views) as code. Identity rides a
trailing HTML-comment marker in `name` (subscriptions pattern) — the API has
no tags/description; rows are addressed by the server-assigned `short_id`.
`filters`/`columns`/`pinned` round-trip as passthrough; `description`/`tags`
are dropped by the create serializer (live-verified). Real PATCH update and
real DELETE (204). Includes pull codegen, unit tests, two examples, README
scope (logs:read/write), and a resources.md row.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Seed one logs view per smoke run (key/name suffixed by $STAMP), add
logs-views to SMOKE_KINDS, and wire --logs-view=<key> into smoke-cleanup.ts.
Verified in isolation: seed -> apply -> pull --all-rows -> tag-back ->
dry-run re-apply is a no-op, and the cleanup trap deletes the row. (Full
`pnpm smoke` is currently blocked upstream of logs-views by a pre-existing
gap: `actions` is in SMOKE_KINDS but has no pull codegen on pl/spec-migration,
so pull fails at args validation before reaching any resource.)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant