Registry Mirror
Skip to content

Conversation

@backnotprop

@backnotprop backnotprop commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

What

Owner request (2026-10-12): "Archived messages should move out of the Quiet list. They should only be visible within a panel on the Settings page … the ability to unarchive them … when I do, it goes back to the thread on the main list."

  • The window's list no longer shows archived threads in any section, Quiet included. Marked-read threads stay in Quiet. Sidebar folder counts are unchanged.
  • Settings has a new Archived block (above "Stored on this machine"): "N archived threads", one Settings row per thread (agent mark, thread chip, subject, agent, "Archived today / Oct 9", message count) with Unarchive. With several projects the rows sit under a small header per project with its count ("billing · 2"); no native select. 50 rows, then "Showing 50 of N · Show 50 more". Empty: "Nothing archived." Unarchive is 44 px on phones.
  • Unarchive opens the thread in the main list, in whatever section its state puts it, with "Moved back to your Inbox: “subject”." and Undo.
  • Archiving from a thread keeps its toast and Undo; while the thread stays open its row keeps its place, shown archived (held order), and leaves when the person leaves. A deep link still opens an archived thread.

A thread that came back (mail apps' rule)

An agent's reply_to reply lands after the thread's archive line (the root line that set its current resolved_at; the seq is derived from the log, rebuilt by every replay, cleared in reload, never written).

  • Answerable without unarchiving. Messages after the line behave as an open thread's: picks, Send, the decision switch, and annotations on their files or guided review are taken (closedByArchive in targetMessage and the annotation guards); messages before it still refuse with 409 thread_resolved. The thread stays resolved. Nothing unarchives it implicitly (not on Send: that would reopen archive-closed questions and change default-thread routing). New message stays refused and hidden.
  • One question state (InboxStore.questionWire / questionsOf) for the window's thread, the event stream (so notifications and the sound fire), the Decisions page and decisions_waiting, and the relay push (so the lock-screen answer is offered). read_thread's list and wait_for_reply treat a thread an agent wrote in after the archive as open, so the answer reaches the waiting agent; a seen-line rewrite no longer ends a wait as "resolved".
  • Back only while something waits. Rows carry the optional agent_after_archive (an agent wrote after the line) and back_from_archive (that, plus something waiting: an unseen post-archive agent message, a live open or picked question, or the person's reply after the line the agent has not read). While back_from_archive the thread is in the list (New / Waiting / Holding / Stopped / Sent) and out of the Archived block; once handled it is archived again by itself. Archive-closed questions stay closed, so a plain update comes back as New.
  • Window. Cards, Reply and comments are live for post-archive messages. The foot reads "Archived · wrote after you archived it. Your reply goes to it; the thread stays archived." with Unarchive. Mark read works on what came back: it sets aside the post-archive questions (the agent is told once), the thread goes back to Archived ("went back to Archived" toast), and Undo brings it back.

Server and wire (phone compatibility)

All of it adds to the responses; nothing an existing client reads changes.

  • GET /api/inbox/threads keeps its six sections, and by default archived threads stay in Quiet (the phone door forwards this route as is, and the iPhone app may draw the sections natively). The window asks ?archived=exclude; any other value is 422. A came-back thread is placed the same way in both modes.
  • GET /api/inbox/threads/archived?project=&offset=&limit= (1 to 200, default 50): { serverSession, cursor, project, projects: [{ id, name, archived }], total, offset, limit, threads }, newest archived first. The door has an explicit read-only allowlist row for it.
  • GET /api/inbox/threads/:id gains row (the thread's list row) and thread.archive_seq.
  • Docs: CLAUDE.md (list rules, Archived, Archive/Mark read, Inbox Server table, door allowlist) and adr/implementation/inbox-mobile.md.

Tests

  • packages/shared/inbox/list.test.ts: the archived predicate, section placement of a came-back thread, order.
  • packages/shared/inbox/store-archived.test.ts (real store): came-back placement (Stopped) with the archive-closed question closed and the new one open; replay equals live; answering the later message without unarchiving while the earlier one refuses; back to the archive once the agent reads the reply; plain news back as New and archived again once looked at; Mark read and its Undo; no Mark read on a plain archived thread; re-archiving.
  • packages/server/inbox-archived.test.ts (real server + MCP): default and exclude lists, archived route order, project filter, paging, 422s, unarchive, row; a came-back question is open on the event stream, counted in decisions_waiting, answered over HTTP (picks + reply 200), the answer reaches wait_for_reply, and the thread is archived again afterwards.
  • packages/server/inbox-relay-push.test.ts: a question asked after the archive line is pushed with its lock-screen answer, and that answer is accepted; the archive-closed one stays closed.
  • packages/server/inbox-devices.test.ts: list and thread keys, the door's list keeping archived threads in Quiet, threads?archived=exclude, threads/archived.
  • packages/inbox/held.test.ts: markHeldRowArchived.
  • packages/inbox/archived.test.tsx (DOM, real Inbox; in the CI DOM list): empty state; archive the open thread → held → gone after leaving → in Settings → Unarchive opens it; deep link; project headers with no select; an agent reply bringing a thread back; answering in a came-back thread with the foot copy, the thread staying resolved.
  • tests/e2e/inbox-archived.spec.ts (compiled binary): the same flow end to end, including picking and sending in a came-back thread.

Re-review lows (fixed)

  • Mark read on a thread that came back now leaves it in the archive: the "person reply the agent has not read" clause of back_from_archive ignores Mark read's set-aside note and its Undo's reopened note, as readAt does. Test: the note is written and the thread is still archived, live and after replay.
  • Unarchive drops a Mark read made while the thread was archived (cleared in the same root line, so a replay agrees); one made before the archive is kept. Test: after Mark read on what came back and Unarchive, read_at is null and the thread waits on its reopened question, live and after replay.

@backnotprop
backnotprop force-pushed the feat/inbox-archived-panel branch 2 times, most recently from 427a7eb to fb19bcd Compare October 12, 2026 17:18
…chive

The window's list no longer shows archived (resolved) threads in any
section, Quiet included; Settings gains an Archived block listing them
newest archived first (project filter, paging, Unarchive that opens the
thread back in the main list).

Server, all additive: GET /api/inbox/threads?archived=exclude (the
default keeps archived threads in Quiet, so the phone and older windows
read what they read before), archived_count, GET
/api/inbox/threads/archived, and the thread read's row.
…nel by project

An archived thread with an agent message after its archive line is news
again (mail apps' rule): derived from the log (the seq of the root line
that set resolved_at, rebuilt by every replay), no writes. It returns to
the list placed like an open thread (its post-archive questions live),
leaves the Archived block and archived_count, and stays resolved until
the person acts. Rows carry the additive agent_after_archive.

The Archived block drops its native select: with several projects the
rows sit under a small header per project with its count.
…tate, and goes back once handled

- Messages after the archive line behave as an open thread's: picks, Send,
  the decision switch and annotations use closedByArchive (archive-closed
  ones still refuse); the thread stays resolved; nothing unarchives on Send.
- One question state (InboxStore.questionWire) for the event stream, the
  Decisions page and count, and the relay push; wait_for_reply and
  read_thread treat a thread an agent wrote in after the archive as open.
- back_from_archive: the thread is in the list only while something waits
  (unseen post-archive agent message, a live open or picked question, or
  the person's reply the agent has not read); handled, it is archived again.
- Window: live cards, Reply and comments for post-archive messages, the
  came-back foot, Mark read on what came back (sends it back, with Undo).
- resolvedSeq cleared in reload; an explicit door row for threads/archived;
  archived_count dropped; Unarchive 44 px on phones.
… drops a read made while archived

- back_from_archive's unread-reply clause ignores Mark read's set-aside
  note and its Undo's reopened note (as readAt does), so the note no longer
  pulls the thread out of the archive into Quiet.
- Unarchive clears a Mark read made while the thread was archived, in the
  same root line (replay-safe), so the reopened thread is not held in Quiet
  over the questions the archive had closed.
@backnotprop
backnotprop force-pushed the feat/inbox-archived-panel branch from fb19bcd to 7513d7a Compare October 12, 2026 17:37
# Conflicts:
#	.github/workflows/test.yml
@backnotprop
backnotprop merged commit 53a49c8 into main Oct 12, 2026
32 checks passed
@backnotprop
backnotprop deleted the feat/inbox-archived-panel branch October 12, 2026 18:27
backnotprop added a commit that referenced this pull request Oct 12, 2026
…at/inbox-open-stays-put

Both behaviours hold: an archived row is held in place (markHeldRowArchived)
while its thread is open and leaves at the settle; an agent message that
brings a thread back from the archive waits behind "N new"; a thread the
person brought back themselves (unseen 0: Unarchive, a link) settles in.
Mark read's toast keeps its deferred wording for Quiet and Archived.
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.

1 participant