Skip to content

shell: the Session Archive in the sidebar, and its reader - #745

Merged
futurepaul merged 5 commits into
masterfrom
claude/session-archive-shell
Oct 31, 2026
Merged

futurepaul merged 5 commits into
masterfrom
claude/session-archive-shell

Conversation

@futurepaul

@futurepaul futurepaul commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

The person's Session Archive in the shell, and a reader for it. Stacked on #750 (Hermes' state.db), on #757 (the export read streaming), on #744 (the archive and fragment session import). Also adds back the GUIDE's line that the shell lists the archive, held out of #744 until now.

What it adds

  • A "Session Archive" heading in the sidebar, below the chat list at the sidebar's bottom (out of the agent area). It lists the archive's chats, newest first, from its index/chat.json (GET /api/f/{archive}/file, read with the shell's session). It folds open or shut and remembers which. It shows the 30 newest, and an "All N" row opens the archive's own list. The heading is hidden while the person has no archive or it holds no chats.
  • One opens read-only in the middle column, framed as a chat is: the archive's own page at /?s=<key>. The heading shows the conversation's title, with no ⋯ menu and no new-chat button. Nothing is written.
    • The page tells the shell which conversation it shows. It answers the theme message the shell sends each frame, to that origin only, so the heading and the active row follow as the person moves within it.
  • The archive's page (templates/sessions/site) does two jobs:
    • The reader (?s=<key>) uses the chat's own chat.css, markdown.js and icons.js, held through symlinks within templates/, as the brain holds the notes viewer. What the person said shows as bubbles and what the agent said as markdown. The agent's tool calls, their results and its reasoning fold into a "N steps" disclosure, as a chat folds a turn's steps. Compaction summaries fold as "Earlier, summarized", and a date line marks each new day.
    • The list (no s) shows the chats; scheduled runs and side tasks fold away under their own headings.
  • Freshness. An import moves the archive's files, not the person's list, so the shell reads the index again:
    • at once when the archive is new to the page;
    • when the person's list changes, at most once a minute;
    • when the page comes back into view.

The shell treats the archive specially only here: a sidebar heading for the person's one fragment of kind sessions. The SPECIAL-CASE-INVENTORY shell row names it.

Complexity ledger

Adds Where Why Removing it Blast radius
sidebar heading cell/shell/session-archive.js (~95 lines), and in shell.js an import, the openChat(name, push, path) frame path and two calls; chat-list.js (heading: no ⋯ or new chat for the archive); index.html (one section); shell.css (9 lines); SHELL_PUBLISHED the person finds their old chats where their chats are delete the module and its hooks; the archive stays readable at its own address the shell's sidebar; openChat gains an optional path (chats pass none, unchanged)
the reader and list templates/sessions/site/sessions.js (~190 lines), sessions.css (14 lines), 4 symlinks to the chat's files a read-only chat in the chat's look, from the archive's own files; no platform route revert the page to #744's list the archive's page only; the chat template's files are shared, not changed
e2e sessions-ui crates/e2e/src/lanes/sessions.rs, shard 3 the sidebar and reader in Chrome delete the lane none

Tests

cargo xtask e2e --only sessions,sessions-ui: all pass. sessions-ui imports an export with the real CLI, then opens the shell in Chrome as its person, at Settings (the sidebar, with no first agent to make):

  • the sidebar lists the archive's chats under Session Archive, newest first;
  • one opens in the middle column with its title and no ⋯ menu. Its bubbles, its markdown reply and one closed fold of its steps ("Thought", "web_search") read as expected, and there is no composer;
  • the archive's list folds its scheduled runs away, and the heading follows the frame there.

cargo xtask check passes.

🤖 Generated with Claude Code

A "Session Archive" heading below the chat list, at the sidebar's bottom,
lists the archive's chats newest first from its chats' index, read with
the shell's session (at once when the archive is new to the page, as the
list changes at most once a minute, and as the page comes back into
view). One opens read-only in the middle column: the archive's own page
for it, framed as a chat is, which says which conversation it shows so
the heading follows it.

The archive's page reads a conversation in a chat's look (the chat
template's chat.css, markdown.js and icons.js, held through symlinks):
the person's words as bubbles, the agent's as markdown, its tool calls,
results and reasoning folded into steps, summaries folded. Its list
shows the chats, scheduled runs and side tasks folded away.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@futurepaul
futurepaul added this pull request to stack #746 October 30, 2026 22:10

@alexlwn123 alexlwn123 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pass for this stack layer at 96c96e86bec17e564c4d0ddf53db0b5022b81965, against #744 at 1870cde757632df3734b0a4415c20a42819eb9b3.

The sidebar and read-only reader fit the archive's existing file contract. Reusing the chat assets and existing frame/file routes keeps the implementation appropriately small; I found no blocking regression in this layer.

Validation: all nine local sessions checks passed; changed JavaScript parses on the pinned Node; a focused sidebar harness passed navigation, row limits, title updates, refresh throttling and foreign-window message rejection; the release Wasm build passed its budget. CI check and images check are green; e2e shards and real-Hermes Docker checks are still pending. Local sessions-ui could not run: Chrome was absent from default locations, and the installed test browser failed to expose its DevTools endpoint on both attempts with CHROME_BIN set. The engineering-style document at the AGENTS.md path was unavailable.

Non-blocking: cell/shell/session-archive.js derives title() only from index/chat.json. Opening a scheduled run or side task from the archive's list therefore leaves the shell heading at “Session Archive,” although the reader shows the right title. A follow-up can pass the loaded conversation title in the frame's existing message and render it as text; cover navigation between chat, run, side task and list. This does not prevent reading the conversation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@futurepaul
futurepaul removed this pull request from stack #746 October 30, 2026 22:44
@futurepaul
futurepaul changed the base branch from claude/session-archive to claude/session-archive-hermes October 30, 2026 22:44
@futurepaul
futurepaul added this pull request to stack #751 October 30, 2026 22:45

@alexlwn123 alexlwn123 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pass for this stack layer at 2a6930dbe7fc52759ee42f1709351c6adeab7b55, against #750 at 9d24d115800767750f349bebd53b55560304bbea.

The earlier review approved the sidebar and read-only reader; there were no blocking findings. This head merges the updated archive importer beneath that UI. The shell and reader files are unchanged, the added archive fields remain compatible with their reads, and the merge resolution preserves the UI fixture's reasoning/tool messages and adjusts the import assertion to five messages. I found no blocking regression. Reusing the existing frame/file APIs and chat assets remains an appropriately small implementation.

Validation: all eight cargo test -p fragment-core session:: --lib tests passed on this head; git diff --check passed. CI check is green; image and e2e checks are still pending. Browser/e2e tests were not rerun locally. The engineering-style document at the repository's specified path is unavailable.

Non-blocking: the earlier note about the shell heading falling back to “Session Archive” for scheduled runs and side tasks remains unchanged; it can stay a follow-up.

@futurepaul
futurepaul removed this pull request from stack #751 October 30, 2026 23:25
@futurepaul
futurepaul added this pull request to stack #761 October 30, 2026 23:26

@alexlwn123 alexlwn123 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pass for this stack layer at 863fa0daf305e313631b983bd15293052aff7448, against #750 at 9074270b25be5ec7ce80dbc20cebfeaf27e2eae6.

The earlier review had no blocking findings. This head merges importer updates from the base; the shell, archive reader and UI fixture are unchanged. The importer retains the file and index shapes the UI reads, including normalized message text and tool calls. I found no blocking regression in this layer. Reusing the existing frame/file routes and chat assets remains appropriately small.

Validation: eight core session tests and 20 CLI session tests passed on this head (one fixture-regeneration test intentionally ignored); git diff --check passed. CI images check passed; the main check, e2e shards and real-Hermes Docker check were pending when inspected. Browser/e2e tests were not rerun locally. The engineering-style document at the repository's specified path is unavailable.

Non-blocking: the earlier shell-heading fallback for scheduled runs and side tasks remains unchanged and can stay a follow-up.

@alexlwn123 alexlwn123 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pass for this stack layer at 5e8f322d8efa99841468e490b1ca6493884ae25a, against #750 at 03c9a57491999d4bb94d295155dac8aeea4b2f90.

The earlier review had no blocking findings. This head merges the base's importer recovery fix: files changed since the indexes' commit are reread even when their size is unchanged. The shell, reader, UI fixture and archive data format remain unchanged. I found no blocking regression in this layer; reuse of the existing file/frame routes and chat assets remains appropriately small.

Validation: 22 CLI session tests passed (one fixture-regeneration test intentionally ignored), including interrupted imports with equal-size replacements and recovery beyond the commit-history bound. Eight core session tests and git diff --check passed. CI images check is green; the main check, e2e shards and real-Hermes Docker check were pending when inspected. Browser/e2e tests were not rerun locally. The engineering-style document at the repository's specified path is unavailable.

Non-blocking: the earlier shell-heading fallback to “Session Archive” for scheduled runs and side tasks remains unchanged and can stay a follow-up.

…ive-shell

# Conflicts:
#	cell/shell/shell.js
#	crates/e2e/src/lanes/mod.rs

@alexlwn123 alexlwn123 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pass for this stack layer at f4a1e5fb225752f66eba0d1f1e5f9ebc99076c9d, against #750 at 49f93f9afde3346e47a13a44c8d9ecf5a53aec03.

The earlier review had no blocking findings. This merge preserves the archive title callback while adopting the base's updated chat-list dependencies, and keeps sessions-ui in the revised shard list. The archive module, reader and UI fixture are unchanged; the importer still supplies the format they read. I found no blocking regression in this layer. Reusing the existing file/frame routes and chat assets remains appropriately small.

Validation: eight core session tests and 25 CLI session tests passed (one fixture-regeneration test intentionally ignored); git diff --check passed. CI check and images check are green; e2e shards and real-Hermes Docker remain pending. Browser/e2e tests were not rerun locally. The engineering-style document at the specified repository path is unavailable.

Non-blocking: the earlier shell-heading fallback to “Session Archive” for scheduled runs and side tasks remains unchanged and can stay a follow-up.

Base automatically changed from claude/session-archive-hermes to master October 31, 2026 04:50
@futurepaul
futurepaul added this pull request to the merge queue Oct 31, 2026
Merged via the queue into master with commit 6d1ceaf Oct 31, 2026
16 checks passed
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