feat(logs-view): manage logs saved views as code - #96
Open
pl wants to merge 3 commits into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds logs views (
projects/{id}/logs/views) as a managed resource.Design
name(the subscriptions pattern) — the API exposes notags/description, andnameis the only free-text field (maxLength 400, generous budget). A validation guard fails fast ifname+ marker exceeds 400.short_id(like session-recording playlists).filters/columns/pinnedround-trip as passthrough;description/name/tagsextras are silently dropped by the create serializer. RealPATCHupdate (HTTP 200) and realDELETE(204).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
pruneLogsViewcall. All rows cleaned up. Gates:typecheck,typecheck:examples,test(303),lintall 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 tomasterwhen #81 merges. First commit is the codegen regen (skippable in review). Thedocs/resources.mdLogs rows are provisional ahead of the full matrix refresh (#78).🤖 Generated with Claude Code