feat(web): global sessions page with filter, group, sort - #35
Merged
Conversation
/sessions lists sessions across every project. Filters: q (summary OR ID prefix), provider, project, model, after/before. Group by project, day, provider, or model with sticky aggregate headers. Sort by time, messages, prompts, or tokens — tokens is new in the catalog layer, so the CLI gains --sort tokens too. Dense two-line rows per docs/design/0003-global-sessions.md (kiln pass over the quiet-terminal material): every sort key is a visible column, active filters render as clearable chips, the form works without JS, limit=100 with honest Showing X of Y footer. GET /api/sessions is the same query as JSON in an envelope with total/shown. Fixes shipped alongside per the design audit: .empty-state promoted out of memSectionCSS, dark-mode provider badge contrast, the advertised-but-unbound d shortcut (this page). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… native submit Review pass: Enter in a text field fires native form submit, which bypassed the debounced empty-param stripping and produced ?q=x&provider=&model= URLs. One shared stripEmpty on the submit event covers both paths. 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.
What
/sessions— the cross-project session cockpit the web UI was missing. Every session across every project, with:q= summary substring OR session-ID prefix), provider, project, model,after/beforedatestokensadded at the catalog layer, so the CLI gainsccx sessions --sort tokenstooGET /api/sessionsserves the same query as JSON in a{sessions, total, shown}envelope; per-project/api/sessions/<project>keeps its bare-array shapeDesign
Spec'd before building:
docs/design/0003-global-sessions.md(design-system pass against the 0002 quiet-terminal contract). Key calls: dense two-line rows instead of cards (every sort key is a visible aligned column), one GET form usable with JS disabled, active filters as per-param-clearable chips,limit=100default with an honestShowing X of Yfooter, state entirely in the URL.Adjacent defects the design audit surfaced, fixed here: dark-mode provider badge contrast (~2.1:1 → ground-color text),
.empty-statetrapped inmemSectionCSS(), the advertised-but-unbounddtheme shortcut (bound on this page).Verification
make fmt/make test/make buildclean; 25+ new assertions (grouping modes + ordering, q ID-prefix semantics, chips, footer copy, API envelope, invalid-param fallback, per-project API shape unchanged)limit=02.4MB (opt-in, labeled "(slower)")html.EscapeString; URLs viaurl.Values.Encode(); no map-iteration ordering leaksFollow-ups (not filed, Eric-gated)
Session.Title(SessionMeta + CacheFormatVersion bump) to light up the row-label precedencepageHeader(), 900px sidebar breakpoint vs the 0002 two-breakpoint rule, index/project/focus contradicting its own placeholder🤖 Generated with Claude Code