Skip to content

docs(web): document session list and search behavior - #1984

Open
techotaku39 wants to merge 3 commits into
tiann:mainfrom
techotaku39:docs/web-session-list-behavior
Open

techotaku39 wants to merge 3 commits into
tiann:mainfrom
techotaku39:docs/web-session-list-behavior

Conversation

@techotaku39

Copy link
Copy Markdown
Contributor

Summary

  • Add a dedicated guide for Web session-list ordering, grouping, search, filters, and preview behavior.
  • Document metadata search semantics, relevance-first ranking, wildcard and multi-term matching, and the distinct share-target and @-mention picker policies.
  • Link the guide from the VitePress navigation, the Web README, and the PWA share-target documentation.

Problem / Motivation

The Web session list has user-visible ordering and search behavior that was previously described mainly by source code and tests. This made it unclear why search results are not always ordered by date and how the main sidebar differs from the share-target and @-mention pickers.

This documentation-only change records the current behavior without changing runtime logic or exposing internal scoring constants.

Validation

  • bun typecheck — passed.
  • bun run test:e2e -- terminal-wrap-fidelity.spec.ts — passed, 2/2.
  • bun run build — passed; existing Vite/PWA warnings were emitted for unresolved KaTeX font references, missing manifest theme_color, stale Browserslist data, and large chunks.
  • VitePress 1.6.4 build via the equivalent Node API invocation — passed; the pre-existing cli/README.md link to http://localhost:3006 was temporarily ignored for this check.
  • git diff --check — passed.
  • bun run test — 2,937 tests passed, 11 failed, and 9 skipped across the CLI run; the failures were unrelated existing Windows/platform-environment cases involving executable/PATH resolution, Windows shell quoting, file modes, and media URL handling. Because test:cli failed, the chained Hub/Web/Shared/Relay suites did not run.
  • No Hub, Runner, FRPC, or task test environment was started; this is a documentation-only change.

Related Issues

Refs #1841
Refs #1842
Refs #1848

AI Disclosure

OpenAI Codex (GPT-5.6) assisted with repository analysis and documentation drafting.

@heavygee heavygee added documentation Improvements or additions to documentation area:docs Documentation site and guides area:web Web PWA / React client community-pr PR from non-collaborator contributor labels Oct 6, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review mode: initial

Requirement — Pass

A user-facing guide is justified because session ordering, search ranking, and picker policies differ in ways users need to understand.

Evidence

  • The snapshot PR description identifies confusion about relevance versus recency and differences between session pickers.
  • web/src/lib/sessionListSearch.ts, web/src/lib/sharePickerSessions.ts, and web/src/lib/sessionReference.ts implement distinct ranking policies.

Approach — Pass

A dedicated guide linked from the documentation navigation, Web README, and PWA guide appropriately documents existing behavior without changing runtime logic.

Evidence

  • The complete merge-base diff changes only docs/.vitepress/config.ts, docs/guide/pwa.md, docs/guide/session-list.md, and web/README.md.

Code — Reviewed

Reviewed the entire fixed-head diff against the relevant implementation. One documentation correction is needed for search-result expansion.

  • [Minor] Distinguish project collapse from preview pagination — docs/guide/session-list.md:59

Testing

Not run (automation; PR code execution is prohibited).

  • Static diff and local link-target inspection completed; git diff --check passed. No PR code, tests, builds, or scripts were executed.
  • Observed CI: integration and windows-codex-mcp succeeded; test remained in progress.
  • The PR description reports successful typechecking and builds, plus 11 CLI test failures attributed by the author to existing platform/environment cases; those claims were not independently reproduced.

HAPI Bot

Comment thread docs/guide/session-list.md Outdated

Search preserves the session-list structure: pinned rows remain contiguous and
project groups remain visible. Search does not apply a relevance cutoff; if a
group is collapsed, matching rows remain available when that group is

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[Minor] Distinguish project collapse from preview pagination

When a search matches more sessions in one project than the preview limit, the project is already open: isGroupCollapsed returns false while filtering (web/src/components/SessionList.tsx:1435–1436). getVisibleGroupSessions still applies the separate preview cap. Expanding the project header therefore cannot reveal the remaining matches; users must use the batch reveal control. This paragraph, together with the 'collapsed project' description on line 73, directs users toward the wrong control.

Suggested fix

Explain that search automatically opens matching project groups, but preview pagination still applies and additional matches are revealed through the batch controls. Describe the preview limit as applying within an open project group on line 73.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review mode: follow-up after new commits

Requirement — Pass

A dedicated guide helps users understand relevance-based search, session ordering, filters, and the different picker policies.

Evidence

  • The snapshot PR description identifies confusion about relevance versus recency and differences between session pickers.
  • web/src/lib/sessionListSearch.ts:211, web/src/lib/sharePickerSessions.ts:21, and web/src/lib/sessionReference.ts:68 implement distinct ordering policies, consistent with the related #1841/#1842/#1848 discussion.

Approach — Pass

Documenting existing behavior in one guide and linking it from relevant entry points is appropriate and introduces no runtime changes.

Evidence

  • The full merge-base diff changes only docs/.vitepress/config.ts, docs/guide/pwa.md, docs/guide/session-list.md, and web/README.md.
  • docs/guide/session-list.md:35 describes metadata matching and relevance without exposing scoring constants; lines 89–106 distinguish share-target and mention policies.

Code — Reviewed

Reviewed the entire fixed-head diff against the relevant implementation and linked contracts. No actionable defects found. The previous finding is resolved: the guide now distinguishes automatically opened groups from preview pagination and directs users to batch reveal controls.

No reportable code issues found.

Testing

Not run (automation; PR code execution is prohibited).

  • Static content and local link-target inspection completed; git diff --check passed. No PR code, tests, builds, or scripts were executed.
  • Observed CI: integration succeeded; test and windows-codex-mcp remained in progress.
  • The snapshot reports successful typechecking and builds, plus 11 CLI test failures attributed by the author to existing platform/environment cases; downstream suites did not run. These local validation claims were not independently reproduced.

HAPI Bot

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Documentation site and guides area:web Web PWA / React client community-pr PR from non-collaborator contributor documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants