Skip to content

feat(sessions): archive and restore native conversations - #1406

Merged
pascalandr merged 2 commits into
devfrom
feat/native-session-archives
Nov 9, 2026
Merged

pascalandr merged 2 commits into
devfrom
feat/native-session-archives

Conversation

@pascalandr

Copy link
Copy Markdown
Contributor

Summary

Closes #929 and #1207 by using the native archive/restore API already present in OpenCode 2.2.3. The 2.2.6 run --archived announcement adds CLI convenience; no minimum or dependency bump is required.

  • Session row Archive session / Restore session actions and an Archived badge.
  • Search-local Unarchived sessions / Archived sessions / All sessions selector.
  • Hide idle archived branches in normal browsing and session-list cycling; preserve selected conversations and paths to running work or pending requests. Children retain independent native flags and remain independently searchable.
  • Serialize native writes, follow with ordinary authoritative inventory refresh and verify the flag. Failed/uncertain writes never synthesize local archive state or replay automatically.
  • Project archive events and fence older metadata reads; retain complete native inventory for ownership and recovery.
  • Technical docs and help in all ten locales; native minimum/latest coverage in CI.

Validation

  • Official isolated 2.2.6 and 2.2.3 CLI probes pass archive/restore, filtered cursor pagination, unfiltered listing, persisted flag, idempotent events, retained transcript and unchanged child flag, with no archive-induced model execution.
  • 132 targeted UI/store/recovery/pagination tests pass; 61 proxy ownership tests pass.
  • Workspace typechecks and 31 help tests pass.
  • Main real-browser archive/restore/search/failure journey passes, as do existing search and child-activity checks. Final compact-menu/delete reruns are in progress.
  • The repository fixture-wiring checker reports two pre-existing violations in unchanged WebKit automation tests (automation-webkit-geometry.test.ts, automation-webkit-page.test.ts); the new browser fixture uses the shared daemon and navigation budget.

Native probes use synthetic private databases and a local provider, never the shared daemon or user state. Large existing touched files: session-list.tsx (~1168 lines), session-events.ts (~732), session-state.ts (~1343).

Use OpenCode's existing archive API to keep completed conversations without deleting their history. Add row archive/restore actions and an Unarchived/Archived/All filter in session search, with native archived badges. Hide idle archived branches during ordinary browsing and keyboard cycling, while keeping selected conversations, running work and pending-question ancestor paths reachable. Child archive flags remain native and independent.

Serialize archive writes with session actions, refresh authoritative inventory and verify the returned flag. Preserve newer archive events against metadata reads started earlier. Retain complete inventory for ownership and recovery; never synthesize local archive state or replay uncertain writes. Runtime minimum and dependency pins stay unchanged.

Add native minimum/latest archive probes for persistence, filtered cursors, idempotent events, transcript preservation and unchanged children; store and real-browser coverage for actions, filtering, failures and stale reads. Update technical docs and user help in all ten locales. Focused UI regressions, proxy tests, typechecks and native 2.2.3/2.2.6 checks pass.
…tles

Use a naturally overflowing session title to exercise the compact menu and wait for measured row geometry before keyboard selection. Verify both archive and restore through native keyboard menu activation without forced pointer actions. Keep archive-tree activity checks explicit and calculate latest activity without spreading arbitrarily large child arrays.
@pascalandr

Copy link
Copy Markdown
Contributor Author

Gatekeeper review

Reviewed head: 721e6f8d2b99c7d92a761ed12c6a09f15bbe5374. Findings: 0.

Reviewed the existing generated client and proxy ownership path, mutation queue, native event projection, session metadata merge, normal hierarchy/list cycling, flat search and retained inventory. The archive state comes only from native time.archived; archive/restore writes receive authoritative refresh and flag verification. Refusal, silent unsupported writes and replaced connections cannot synthesize an archive flag. Metadata reads capture their baseline before I/O so newer archive events win.

Normal browsing hides idle archived branches, preserving the selected conversation and paths to running work or pending input. Child flags are not rewritten; flat search filters each session independently. Full inventory remains available for ownership, recovery, transcript reads and search. No data deletion, prompt, shared-service restart, minimum/pin change or local archive store is introduced.

Validation

  • Official isolated 2.2.6 and minimum 2.2.3: native archive/restore, persisted flag, filtered cursor pagination, unfiltered list, idempotent events, unchanged child flag and exact retained transcript all pass.
  • 132 targeted UI/store/recovery/pagination tests and 61 proxy tests pass. After the final explicit activity check/tree reduction, 20 focused tree/archive-store tests pass again.
  • Workspace typechecks pass; final UI typecheck passes.
  • Real browser: both archive journeys pass, including normal row actions, discovery, restoration, rejected writes, native events, selected-conversation retention and keyboard archive/restore through the compact menu. Existing search, descendant-activity and phone/narrow/desktop deletion journeys pass. Initial fixture attempts exposed a short title that did not overflow and an action attempted before measured compact layout settled; the final fixture uses a real long title and waits for the production geometry state, never forced clicks. An initial parallel phone-navigation timeout passed in the serial rerun.
  • 31 help checks pass, with strings and help updated in all ten locales. Workflow YAML parses and whitespace checks pass.

Existing repository failure retained

The fixture-wiring checker fails on two unchanged WebKit test files (automation-webkit-geometry.test.ts, automation-webkit-page.test.ts) missing exemption/budget declarations. The new archive fixture meets the shared-daemon/navigation-budget rules. This is recorded separately; the entire repository suite is not claimed green.

Large existing source files touched: packages/ui/src/components/session-list.tsx (~1168 lines), packages/ui/src/stores/session-events.ts (~732), packages/ui/src/stores/session-state.ts (~1343).

@pascalandr
pascalandr merged commit d999843 into dev Nov 9, 2026
2 checks passed
@pascalandr
pascalandr deleted the feat/native-session-archives branch November 9, 2026 00:04
@pascalandr

Copy link
Copy Markdown
Contributor Author

Full CI follow-up

Run 42538167720, attempt 1 finished red. Both native archive probes explicitly pass on OpenCode 2.2.3 and 2.2.6, and both archive browser journeys pass in shard 2, including keyboard compact-menu archive/restore.

All observed failures were inspected:

Failure Follow-up
Tauri Windows/macOS and three WebKit jobs: Cargo rejects the lockfile under --locked, before compilation #1407 repairs dangling windows-sys edges; its five affected native jobs already pass, PR still open
Main tests: binary-build-order contract omits tests-tauri-webkit from the expected prerequisites Correction is already included in #1305, still open
Browser 3: two Tauri settings-help assertions read the previous native opening receipt #1410 waits for the new receipt, still open
Browser 3: hidden Electron preview misses Key:a within 500 ms Matching fixture-readiness symptom is covered by #1345, whose browser shard 3 passed; this run's precise cause is not proven
Browser 4: two WebKit test wiring/budget declarations Already fixed in merged #1402

The failing files are unchanged between this PR's base and reviewed head. Its workflow diff only adds the archive native script and store test, without changing build prerequisites. The main tests job stops early, so later unit steps are not claimed to have passed CI. No observed failure implicates the archive paths, but the complete release candidate remains unqualified until integrated final-head CI and builds pass.

Existing fixes are being tracked rather than duplicated. No unchanged-head rerun or release publication was requested by this triage; #1395 remains draft with no auto-merge.

shantur added a commit that referenced this pull request Nov 18, 2026
# CodeNomad 1.1.0 - Design, memory and event-driven Missions

Create images in a dedicated Design workspace, carry useful knowledge
between conversations, and let Missions respond to schedules and
repository activity. CodeNomad 1.1 also makes long conversations more
responsive and keeps your workspace easier to recover across project
tabs, browser reloads and mobile app switches.

## Before upgrading

- **OpenCode 2.3.0 is the minimum and recommended runtime.** CodeNomad
1.1 refuses 2.2.x services. Updating CodeNomad does not update or
restart OpenCode: review **Settings > OpenCode**, install or select a
compatible executable, and explicitly restart the shared service when
needed. That restart can interrupt other connected clients (#1491).
- The remotely updated **1.1 interface requires a CodeNomad 1.1.0+
server**. Older servers retain their cached or bundled interface until
the application/server is updated.
- **Memory is off by default.** Design requires the separately installed
and enabled panel extension and suitable configured models. Requests
prepared by the Design panel remain editable until you send them.
- **Windows packages ship without production code signing.** Windows may
show an unknown-publisher warning.

## Design and Images

- Use the **Design** agent and image skills from the Design panel, with
an **Images conversation** for each project folder or worktree.
- Browse images, prepare follow-up requests, compare results and inspect
image lineage where it can be verified. Local-file Markdown images
render directly in the transcript (#1196, #1201, #1202, #1203, #1204,
#1205).

## Optional local agent memory

- Save useful facts, preferences and references in separate **About
you** and **Project** scopes. Worktrees of the same repository share
project memory.
- Review, edit and tidy entries in Settings, with a local change
history. Disabling Memory keeps saved entries and removes its tool from
the agent's catalogue; enabling or disabling it updates running sessions
without restarting OpenCode. The entry list folds under **Entries**,
with its New, Modified and Needs review badges shown on the summary
(#1313, #1479, #1572).

## Missions that run on schedules and events

- Combine schedules and events with **or / if / else**, time zones and
fallback schedules. Armed native schedules can run with CodeNomad closed
while OpenCode and the execution host remain available (#1259, #1291,
#1350).
- Trigger work from new or merged pull/merge requests and new issues on
**GitHub, GitLab or Gitea**, with optional author filters. GitHub.com
also supports account notifications and Dependabot alerts. Checks use
the execution host's forge access (#1461, #1466).
- Continue scheduled work in an **Existing session**, preserving its
conversation, title and permissions, or start a fresh coordinator for
each passage. Add and edit **Followed conversations** before the first
launch, including for an immediate Mission (#1461, #1545).
- Follow tasks and results in a single tree, open the conversation
needing your answer, and read summaries or detailed playbook
instructions. Waiting, running, paused, interrupted and unconfirmed
states have distinct labels and recovery actions (#1381, #1391, #1507,
#1542, #1544).
- Agents can do everything the Missions editor and panel offer: prepare
Missions with automatic start or schedules, control existing Missions
and schedules, and use saved configurations and Missions settings from
any conversation of the project (#1551).
- Creation, preference saves and interrupted schedule wakes recover
through their original requests instead of creating replacement work.
Human questions stay with the coordinator, and each scheduled passage
retains its own journal and result (#1227, #1482, #1540, #1547).

## Integrations managed from Plugins

- Manage native integrations from **Status > Plugins**. Each row shows
the installed package version and a clickable application/document
state: install or update the application part, attach to a compatible
open document, or detach the displayed conversation. Native first-use
attachment remains available (#1492, #1509).
- Add native plugin packages, control Global or Project activation where
supported, and explicitly check for package updates. Git-installed
packages show their version or a short commit identifier; details retain
the full commit. Application installation and plugin removal require
confirmation (#1232, #1239, #1556).
- Provider usage includes additional quota readers, OpenCode Console's
reported counts and credit balance, and a labelled estimate for OpenCode
Zen free usage. Explicit model choices survive a loading catalogue. An
active `/goal` stays on one line above Tokens in Status (#1309, #1312,
#1317, #1455, #1521).

## Clearer, more responsive conversations

- Background subagent cards show intermediate and final reports and keep
tracking the child until settlement. Watched child transcripts update
while streaming (#1464, #1491, #1534).
- Long sessions open more smoothly through deferred highlighting and
tool rendering. Scrolling and **Latest** keep following streamed
replies, and an older repair read preserves text already received
(#1486, #1500, #1520, #1538).
- Render **Mermaid** diagrams locally, switch between source and
diagram, and preview `.mmd` files. Click project-file links in replies
to open the file reader. Code Mode JSON is easier to read, and
interrupted shell calls retain their output separately from the stop
notice (#1469, #1485, #1491).
- Archive conversations without deleting their history, navigate between
user messages, and delete long-context sessions more responsively
(#1406, #1449, #1484).

## A workspace that stays yours

- Open the same project or conversation in multiple tabs with
independent views, scroll positions, panel choices and Mission readers.
Keep chat in one tab and a file, web preview or report in another;
duplicate tabs share one live web preview per conversation, and messages
and execution remain shared (#1510, #1571).
- With **Restore previous state** enabled, a browser/PWA tab restores
its projects, selected conversations, drafts and reading positions after
a page reload or mobile page discard. A new tab or fully closed PWA
starts on the home page (#1515).
- Closing a project tab keeps its unsent drafts and attachments
available when you reopen that folder in the same window. These
closed-project drafts are temporary, not part of startup restoration
(#1522).
- **Contrast** works across palettes: **Auto** follows the system
preference, **On** increases contrast and **Off** keeps normal
rendering. It preserves your selected palette and editable colours
(#1569, #1570).

## Desktop, diagnostics and access

- Startup shows the actual backend state and offers **OpenCode
settings** when recovery is needed. Setup separates the installed CLI
from the running service, and logs and background-command output open in
non-modal windows (#1467, #1528, #1531, #1560).
- **Launch at startup** can start OpenCode when you sign in; keeping the
computer awake is a separate opt-in desktop setting. Windows Tauri
displays a boot splash during delayed startup, and Linux Tauri supports
pasted images/files and avoids menu-bar overlap (#1288, #1290, #1307,
#1470, #1503).
- Remote HTTP windows support Mission creation and OAuth link copying.
Administrators can disable Remote Control and lock the listening
address. Trusted direct HTTPS access can opt in to SideCars; enable this
only for users trusted to use those services (#1474, #1489, #1523,
#1525).
- Desktop runtimes and security-sensitive dependencies have been
updated. Process ownership, listener-origin checks and proxy destination
validation are hardened, alongside Linux GLib and packaging fixes
(#1457, #1458, #1459, #1473, #1543, #1552).

History, search, navigation, Images and technical cleanup support
OpenCode's optional split assistant-part storage. Plugin readiness
handles accumulated backend presence records, and assistant text stays
searchable with the updated SQLite runtime (#1359, #1453, #1490).

## Support CodeNomad

CodeNomad is free and open source, maintained full time by Pascal
Andr├®. You can support its continued development through [GitHub
Sponsors](https://github.com/sponsors/pascalandr) or
[Ko-fi](https://ko-fi.com/pascalandr).

**Full changelog:**
v1.0.1...v1.1.0
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.

Sessions: adopt native session archiving once OpenCode exposes an archive API

1 participant