Skip to content

feat(desktop): conversation work states, granular Office, projects × PRs × Notion - #45

Merged
Mariusfaitducode merged 2 commits into
marius/mainfrom
feature/office-states
Nov 17, 2026
Merged

Mariusfaitducode merged 2 commits into
marius/mainfrom
feature/office-states

Conversation

@Mariusfaitducode

Copy link
Copy Markdown
Owner

Stacked on #43 (Focus, feature/active-workspaces): this branch merged it, so the diff includes #43 until it lands on marius/main. Review from commit 2de8b06.

What changes for Marius

One work state per conversation, the same everywhere (Office bubble, sidebar dot and tooltip, to-dos panel):

State Derived from (first match wins)
Working live lifecycle Start (or live subagents). A turn silent for over 1 h without subagents becomes To check instead
Waiting for your answer permission request, error (red), an open DECISION / DRAFT / BLOCKED report of the latest turn, or a finished turn not read yet
Resume with its to-dos open to-dos
Done, can be closed a DONE report of the latest turn (open or acknowledged)
Resume later reply read with nothing asked, or no prompt yet

Rules for "real" states:

  • Only the conversation's own signals count. Workspace labels (Waiting, In progress) never decide a state; a workspace has no state of its own, its plate shows the count per state.
  • A report counts only for the turn it came with: created at most 10 min before the turn's stop. Older ones, even still open on the Desk, no longer decide.
  • A conversation whose process is gone is not listed (host live bindings). A turn with no event for 1 h shows To check.

Correct it in one click: a state card at the top of the to-dos panel (right panel, popover and inline placements) and in the Office agent panel: current state, why (or "Set by you · 5 min ago" and what automatic would say), four buttons, "Automatic" to undo. "Done, can be closed" offers Close the agent (two clicks, same close flow as the Hosts page).

Pin rule: a pin wins while the agent is not running; the host drops it when the agent starts its next turn (a prompt after a stop or an error; answering a permission continues the turn). Pins follow a resumed conversation to its new terminal.

Office

  • Only workspaces with open agents; desks are filtered agent by agent.
  • Filter bar: one chip per state with counts (multi-select, ⌥-click = only this one), projects, Notion project status, Focus, Clear; rooms by Folders or Projects.
  • Project rooms show their Notion status, PR count and a details button: Notion status (6 statuses as in Notion), Notion page link, specs linked from its PRs (Notion ticket links), open PRs, agents.
  • Agent panel: state card, project picker (Automatic shows how it was matched), to-dos.

How

  • Host: conversation-states store (~/.superset/state/conversation-states.json), conversationStates.list/set/clear router, host-store:changed event, a turn watcher that drops pins on a new turn. Older hosts: the app detects the missing procedure and shows the state without pinning ("Update this host to set the state by hand").
  • CLI: superset state list|set|clear so agents (and the observer) read and set pins.
  • Renderer: deriveWorkState in lib/agent-state/work-state.ts (shared by every surface), useConversationWorkStates, WorkStatePicker. New color var --sb-state-todos (sky) and --sb-state-check (violet); others reuse --sb-state-*.
  • Projects: the Pull Requests page projects (my-pull-requests-state, v4) gain notionUrl and status, seeded for the default projects from the Notion "Projects" database. Workspace → project: pick by hand (office-projects-v1) > its PR's project (same rules and moves as the PR page) > project label > keyword or project name in its name/branch > none. PRs come from the hosts' cached "Mine" read (shared with the Desk via useCachedMyPullRequests).
  • Office filter store v3 migrates the old Everyone / Working / Needs me choice to state chips.

Not visible in the diff

  • Sidebar: the conversation dot now shows the work state (green = done, not "finished unseen"). Workspace-level dots, ⌘K and Ctrl+Tab keep the live state language (follow-up).
  • Notion status is kept by hand in the app (seeded today); no Notion sync, the app has no Notion token.
  • The observer desk from the parallel agent can be added as another special desk next to the rack; this PR does not touch the layout engine.

Checks

  • bun test on office, agent-state, pull-requests, sidebar, TodosPanel, desk hooks, persisted keys (476 pass); host conversation-states store, watcher and router tests.
  • Typecheck desktop and host-service clean locally; lint on every changed file; check:i18n clean, all 16 locales filled.
  • Not run: the app itself (no local builds). UI not verified by eye.

🤖 Generated with Claude Code

Mariusfaitducode and others added 2 commits November 12, 2026 17:29
A one-click target on each workspace (sidebar rows, Ctrl+Tab cards, Office
name plates, Hosts page, Workspaces list and board) puts it in focus; ⌘⇧F,
the context menus, bulk selection, the command palette and F in Ctrl+Tab do
the same. Focused workspaces show a bold name and an indigo target. One
shared "Focus" filter narrows the sidebar, Ctrl+Tab, ⌘K, Office, Hosts,
Workspaces and Needs you.

The Office's "Active" filter (agents not resting) is renamed "Working" so
"active" no longer means two things.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts crossed with PRs and Notion

Each open conversation now has one work state, the same in the Office, the
sidebar and the to-dos panel: waiting for your answer, to check, working,
resume with its to-dos, resume later, or done and closable. It is derived
from the conversation's own live signals (lifecycle, reports of its latest
turn, to-dos, read or not), never from workspace labels. The user pins a
state in one click from the to-dos panel or the Office; the host keeps the
pin (`conversationStates`, `superset state`) until the agent's next turn.

The Office shows only workspaces with open agents, filters by state (with
counts), project and Notion project status, groups rooms by folder or by
project, and opens a project panel with its PRs, Notion page and specs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Mariusfaitducode
Mariusfaitducode merged commit e0c0a7a into marius/main Nov 17, 2026
3 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.

1 participant