GeezerVison is showing github.com — fix(app): list drafts in the inbox sidebar by hearnadam · Pull Request #65525 · anomalyco/opencode
Conversation
hearnadam
commented
Nov 22, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Issue for this PR
Closes #
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
The Inbox layout's sidebar lists sessions but not tabs, so drafts never show there. If you start a New session, type something, open another session and then click New session again, the draft you were typing in can't be opened from anywhere. Its text is still saved, but you can't get back to it.
This PR adds a Drafts group at the top of the Inbox sidebar. It lists the draft you're on, plus every other draft that still has text, an attachment or a context item, newest first. Each row shows the first line of the draft (or "New session") and its project. Clicking a row opens that draft, and right-clicking gives Discard draft, which closes the draft tab.
Drafts saved in an earlier run are found too: the group loads each draft's composer state from storage (tabs.state(..., createDraftComposerState)), the same state the draft page uses. New session itself is unchanged and still always opens a new draft, as in the other layouts.
This is an alternative to #65518, as the review there suggested. That PR made New session reopen the last draft instead; only one of the two should land.
How did you verify your code works?
-
bun run typecheck in packages/app
-
bun test for src/shell/titlebar
-
Ran the web app locally against a demo server and went through the flow in the screenshots below.
Screenshots / recordings
Recorded in the web app (packages/app dev server) against a throwaway local server with demo projects, Inbox layout on.
- Typing in a new draft: it shows under Drafts, titled by its first line.
- After opening another session, the draft stays in the list.
- Clicking New session again: a fresh draft opens, and the earlier one is still listed below it.
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This PR doesn't fully meet our contributing guidelines and PR template.
What needs to be fixed:
- No issue referenced. Please add
Closes #<number> linking to the relevant issue.
Please edit this PR description to address the above within 72 hours, or it will be automatically closed.
If you believe this was flagged incorrectly, please let a maintainer know.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks for your contribution!
This PR doesn't have a linked issue. All PRs must reference an existing issue.
Please:
- Open an issue describing the bug/feature (if one doesn't exist)
- Add
Fixes #<number> or Closes #<number> to this PR description
See CONTRIBUTING.md for details.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks sound. I couldn't run it, because the Inbox sidebar is in the web/desktop app and I can only drive the TUI here. tsc -b in packages/app passes, and the src/shell/titlebar and src/shell/tabs unit tests pass (261/261).
What I checked in the code:
- Shared state: the sidebar reads each draft from the same tab memory key and saved draft prompt that the draft page's composer uses. Rows always match what the draft page shows, and drafts saved in an earlier run are found.
- Discard draft: it goes through
closeTab. Discarding the draft you're on moves you to the next tab, and the draft's saved state is removed.
- Empty group: an empty Drafts group is hidden, and the inbox's empty message still accounts for it.
Public API: unchanged.
This is a visible UI change and it hasn't been run in the app yet. Could you add before/after screenshots or a short recording of the Inbox sidebar? Please cover these steps: type in a New session draft, open another session, click New session, reopen the first draft from the Drafts group, then use Discard draft on the draft you're currently on.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since my last review there's only a merge of dev, which doesn't touch the files this PR changes, and a blank line for the linter. The screenshots of the web-app flow cover what I asked for before. No new concerns. Public API: unchanged.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|