Skip to content

feat(hq): rename, archive and delete a session - #983

Merged
Blind-Striker merged 1 commit into
masterfrom
feat/hq-session-lifecycle
Nov 23, 2026
Merged

Blind-Striker merged 1 commit into
masterfrom
feat/hq-session-lifecycle

Conversation

@Blind-Striker

Copy link
Copy Markdown
Collaborator

📝 Description

What does this PR do?

HQ can now rename, archive and delete a session, through the SDK calls that already exist for them. Labels and behaviour follow upstream's own app at the pin (opencode 2.3.2).

Board rows get "Rename", "Archive" and "Delete…":

  • Rename edits the title in place.
    • Enter or Save saves; Escape or Cancel cancels.
    • The field is read-only while it saves, and an empty or unchanged title closes the form without a call.
    • The row shows the new title at once, as upstream's app updates its lists.
  • Delete… opens a confirm card: "Delete session" / Delete session "{name}"?, with Cancel (focused) and "Delete session" in the danger style. The row goes once the server confirms. A refusal shows "Failed to delete session".
  • Archive removes the row. A refusal of a rename or an archive shows "Request failed".

Session page header: "Rename session" and "Delete session" (upstream's session commands), with the same inline rename and confirm card. After a delete, the page returns to the board.

Behind them:

  • SessionClient.UpdateAsync with Title or Archived = true, and SessionClient.RemoveAsync.
  • The board follows SessionDeleted, SessionArchived and SessionUnarchived, so a session deleted, archived or unarchived elsewhere leaves or returns to the board without a reconnect.
  • It lists sessions with Archived = false, as upstream's TUI does.
  • Each call has a snippet in the SDK calls dock.

One recorded divergence: Archive. Upstream's app builds an Archive button but hides it (SHOW_HOME_SESSION_ARCHIVE = false) until its own client gains a session archive API. The server and this SDK already have that API, so HQ shows the button. HQ's README records this, and the note goes when upstream's app shows the button again.

Related Issue(s):

None.

🔄 Type of Change

  • ✨ New feature (non-breaking change that adds functionality)

🎯 Protocol & API Surface

  • No change to the public API surface (HQ playground only)
  • No generated output changed
  • The pinned snapshot (spec/) is untouched
  • Nothing under external/ was hand-edited

🧪 Testing

  • HQ tests added: rename, archive and delete (each with its refusal), the deleted, archived and unarchived events, and the seed's Archived = false. Each new test failed on the code without its change, or on a no-op, and passes now.
  • The board's test scenario moved into Features/Sessions/Support/BoardScenario.cs, in the shape of the conversation tests' scenario. No existing test or expectation changed.
  • Verified against a real opencode serve (2.3.2), in a browser against an isolated server:
    • rename saves to the server, and Escape cancels;
    • archive marks the session archived;
    • an unarchive made through the API brings the row back;
    • delete removes it (the server answers 404 afterwards), and a delete made through the API removes the row too;
    • the session header's rename and delete work, the delete returning to the board;
    • mobile shows no sideways scroll.

Test Environment:

  • opencode server version: 2.3.2
  • Target frameworks tested: HQ's (net11.0), plus the full gate on all targets
  • Operating systems: Windows 11

✅ Completion Gate

  • The local check in quality-gates.md passes on the head rebased onto master, and HQ's test project passes in full.

📚 Documentation

  • playground/hq/README.md updated: the actions, the event handling, and the archive divergence
  • CHANGELOG.md entry added under [Unreleased]

✅ Code Quality Checklist

  • No new analyzer warnings, and no new suppressions
  • No tests skipped or weakened
  • Branch is up to date with the target branch, no merge conflicts
  • Commit messages carry no AI-attribution trailers

🔍 Additional Notes

Breaking Changes: none. Dependencies: none.

@Blind-Striker
Blind-Striker added this pull request to the merge queue Nov 23, 2026
Merged via the queue into master with commit 03dee15 Nov 23, 2026
15 checks passed
@Blind-Striker
Blind-Striker deleted the feat/hq-session-lifecycle branch November 23, 2026 18:31
@Blind-Striker Blind-Striker mentioned this pull request Nov 24, 2026
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