GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(app): list drafts in the inbox sidebar by hearnadam · Pull Request #65525 · anomalyco/opencode

Conversation

@hearnadam

@hearnadam hearnadam commented Nov 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

  1. Typing in a new draft: it shows under Drafts, titled by its first line.
inbox-drafts-1-draft-open
  1. After opening another session, the draft stays in the list.
inbox-drafts-2-on-session
  1. Clicking New session again: a fresh draft opens, and the earlier one is still listed below it.
inbox-drafts-3-new-session-again

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.

All reactions
@hearnadam
fix(app): list drafts in the inbox sidebar
b65cd07
@hearnadam hearnadam mentioned this pull request Nov 22, 2026
fix(app): keep the unsent draft when New session is clicked in the inbox #65518
Closed
2 of 6 tasks
@github-actions github-actions Bot added contributor needs:compliance This means the issue will auto-close after 2 hours. labels Nov 22, 2026
@github-actions

github-actions Bot commented Nov 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the needs:issue label Nov 22, 2026
@github-actions

github-actions Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

opencodejr[bot]
opencodejr Bot reviewed Nov 22, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
hearnadam added 2 commits November 22, 2026 09:11
@hearnadam
Merge remote-tracking branch 'upstream/dev' into inbox-show-drafts
5a063e8
@hearnadam
fix(app): add a blank line the lint rule wants
3e5f1cb
opencodejr[bot]
opencodejr Bot reviewed Nov 22, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
@hearnadam
hearnadam merged commit 030e8d7 into anomalyco:dev Nov 22, 2026
10 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Hona Hona mentioned this pull request Nov 22, 2026
feat(inbox): list drafts in the inbox sidebar, as official anomalyco/opencode-rune#769
Merged
@neriousy neriousy mentioned this pull request Nov 23, 2026
desktop: unsent new-session draft disappears from the Inbox sidebar #64078
Closed
@BrewTestBot BrewTestBot mentioned this pull request Nov 23, 2026
opencode 2.4.0 Homebrew/homebrew-core#327368
Merged
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
opencode 2.4.0 amrkmn/homebrew-tap#1251
Closed
1 task
@github-actions github-actions Bot mentioned this pull request Nov 23, 2026
feat: opencode release v2.4.0 sprisa/opencode-server#95
Merged
@hearnadam
hearnadam deleted the inbox-show-drafts branch November 24, 2026 21:02
@scottames-github-bot scottames-github-bot Bot mentioned this pull request Nov 27, 2026
chore(deps): update ⬆️ mise-packages scottames/dots#1181
Merged
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor needs:compliance This means the issue will auto-close after 2 hours. needs:issue

Projects

None yet

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.

1 participant

@hearnadam
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.