Skip to content

docs: document real filter behavior on API request pages#33

Merged
BunsDev merged 1 commit into
mainfrom
docs-api-filter-properties
Jul 21, 2026
Merged

docs: document real filter behavior on API request pages#33
BunsDev merged 1 commit into
mainfrom
docs-api-filter-properties

Conversation

@BunsDev

@BunsDev BunsDev commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

Grounds the API request pages' filter/query parameter docs in the daemon source (coven-cli api.rs + store.rs) and fixes a rendering artifact in the route header.

  • Events cursor filters (afterSeq, afterEventId, limit): hoisted into shared components/parameters so GET /events and the path-scoped GET /sessions/{id}/events cannot drift, with previously undocumented behavior now stated — afterSeq takes precedence when both cursors are supplied; non-integer values fail with 400 invalid_request; unknown afterEventIds read from the start of the log; out-of-range limits clamp to 1–1000 rather than rejecting; hasMore is only meaningful when a limit is set.
  • GET /sessions: the description implied tooling could call it "with and without archived filtering" — the daemon accepts no query parameters on this route. It now says so and points to coven sessions --all for archived records.
  • Stray pill before routes: fumadocs-openapi splits paths on / and renders the leading empty segment as an empty <code>, which the dark-mode inline-code pill styling turned into a blob (GET ▢/sessions). A scoped :not(pre) > code:empty { display: none } removes it.

Verification

  • Behavior claims traced to list_session_events / list_events_with_options / route match arms in the daemon source
  • Spec parses and both events endpoints resolve the shared parameter refs (js-yaml check)
  • pnpm run openapi:build regenerates cleanly; rendered pages screenshot-verified (Range chips, precedence notes, blob gone)

🤖 Generated with Claude Code

Ground the query/filter parameter docs in the daemon source
(coven-cli api.rs + store.rs) instead of partial descriptions:

- Hoist the events cursor filters (afterSeq, afterEventId, limit) into
  shared components/parameters so GET /events and the path-scoped
  variant cannot drift, and document previously omitted behavior:
  afterSeq wins when both cursors are supplied, non-integer values
  fail with 400 invalid_request, unknown afterEventIds read from the
  start of the log, out-of-range limits clamp to 1-1000, and hasMore
  is only meaningful when a limit is set
- Fix the misleading GET /sessions description: the endpoint accepts
  no filter parameters and there is no archived query flag; archived
  records are CLI/TUI-only (coven sessions --all)
- Hide the stray pill rendered before API routes: fumadocs-openapi
  emits the leading empty path segment as an empty <code>, which the
  dark-mode inline-code styling turned into a blob

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 21, 2026 23:41
@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
coven-docs Ready Ready Preview Jul 21, 2026 11:42pm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the daemon OpenAPI spec and global styling to better reflect actual query/filter behavior on API request pages and to fix a UI rendering artifact in the route header.

Changes:

  • Clarifies GET /sessions documentation to explicitly state there are no filter/query parameters and that archived sessions are excluded.
  • Deduplicates events cursor/limit query parameter docs by extracting them into shared components/parameters and reusing them across events endpoints.
  • Hides empty inline <code> elements to eliminate the stray “pill/blob” rendered before some OpenAPI route paths.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
openapi/coven.daemon.v1.yaml Refines sessions endpoint docs and centralizes events cursor/limit parameter definitions via component refs.
app/globals.css Adds a global CSS rule to hide empty inline code elements causing an OpenAPI route header artifact.

Comment on lines +681 to +685
Maximum number of events to return. Out-of-range values are clamped
to 1–1000 rather than rejected; non-integer values fail with
`400 invalid_request`. When omitted, all events after the cursor are
returned in one page. `hasMore` in the response is only meaningful
when a limit is set — it is `true` when the page filled the limit.
@BunsDev
BunsDev merged commit f423095 into main Jul 21, 2026
2 checks passed
@BunsDev
BunsDev deleted the docs-api-filter-properties branch July 21, 2026 23:55
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.

2 participants