Add collapsible active-sessions sidebar to the session page - #69
Open
ai-yappa[bot] wants to merge 1 commit into
Open
ai-yappa[bot] wants to merge 1 commit into
ai-yappa[bot] wants to merge 1 commit into
Conversation
Add a left sidebar on /session/:id that lists all other active sessions (running or awaiting review), excluding the current one. The sidebar fetches the session directory on mount, refreshes every 30s and on tab focus/visibility, and persists its collapsed state in localStorage. Factor the home page's session-status derivation into a shared module so the sidebar and home page use one status vocabulary, with unit tests.
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.
Summary
Adds a collapsible sidebar to the Codevil session page (
/session/:id) that shows all other active sessions — sessions currently running or awaiting review — with the current session excluded.What changed
packages/web/src/components/session/session-sidebar.tsx(new)listSessionsendpoint on mount.localStorage(codevil_session_sidebar_collapsed).packages/web/src/lib/session-status.ts(new)deriveStatus,STATUS_LABEL) that lived in the home page so the sidebar and home page share one status vocabulary.isActiveSession(running or awaiting review; archived/failed/done are excluded) andfilterOtherActiveSessions.packages/web/src/routes/index.tsx— refactored to import the shared status module (no behavior change).packages/web/src/routes/session.$id.tsx— renders the sidebar between the top rail and the workbench via a new.session-bodyrow.packages/web/src/session-components.css— sidebar styles (expanded/collapsed widths, dark-mode friendly via existing theme vars, responsive sizing ≤900px).packages/web/src/lib/__tests__/session-status.test.ts(new) — unit tests for status derivation, active filtering, and "other active sessions" selection.Verification
pnpm typecheck(repo root): passes for all packages.pnpm testinpackages/web: 264 tests pass (25 files), including the 10 new ones.pnpm verifyruns the sandbox-image integration tests, which fail in this sandbox (14 failures inpackages/sandbox-image, environment-dependent: clone/pr/agent-tool behaviors). These are unrelated to this web-only change; web typecheck + build + tests all pass.