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): keep the unsent draft when New session is clicked in the inbox by hearnadam · Pull Request #65518 · 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?

In the Inbox layout the sidebar doesn't show drafts. If you click New session, type something, open an existing session and then click New session again, the app makes a brand-new empty draft. The earlier draft keeps its text, but nothing in the UI can open it again.

In the Inbox layout, openNewTab now opens the newest draft that still has text, an attachment or a context item before making a new one. Other layouts are unchanged, because drafts show as tabs there.

Known limit: the check only reads composer states already loaded in memory, so a draft saved in an earlier run and not opened since isn't found.

There's an alternative PR that shows drafts in the Inbox sidebar instead: #65525. Only one of the two should land.

How did you verify your code works?

  • tsc -b in packages/app
  • The repo's pre-push checks

I haven't run it in the app.

Screenshots / recordings

None (no visible UI change).

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): keep the unsent draft when New session is clicked in the inbox
6b079ef
@hearnadam hearnadam mentioned this pull request Nov 22, 2026
fix(inbox): New session keeps the unsent draft anomalyco/opencode-rune#645
Closed
@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.
  • Not all checklist items are checked. Please confirm you have tested locally and have not included unrelated changes.

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.

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.

Reviewed by reading the code; not verified in a running app. The change only affects the web/desktop app's Inbox layout, which I couldn't drive here. tsc -b in packages/app passes, and the titlebar and tabs unit tests pass.

The public API is unchanged.

The approach is reasonable, but two behaviours need a look before merge (see inline comments):

  • The reused draft is picked from any server or project, so New session can jump away from the project you're working in.
  • While any draft has content, New session can no longer start an empty one. If you're already on that draft, the click does nothing.

The known limit (drafts restored from disk aren't detected) means some drafts can still end up out of reach. Showing drafts in the Inbox sidebar would avoid this whole class of problem. That's only a thought, not a request for this PR.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread packages/app/src/shell/titlebar/titlebar.tsx
const openNewTab = () => {
const kept =
settings.appearance.tabLayout() === "inbox"
? tabsStore.findLast((tab) => {

@opencodejr opencodejr Bot Nov 22, 2026

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.

This picks the newest draft with content from any server or project. openDraft places a new draft in the current session's or draft's server and directory (or the home selection). So clicking New session while viewing a session in project B can reopen a draft from project A on another server. Could the search be limited to drafts in the same server/directory that openDraft would use for the current route?

When a draft with content exists, this always selects it. If you're already on that draft, New session (button and tab.new) does nothing, and in the Inbox layout there's no other way to start a second, empty draft. Should this fall through to openDraft(uuid()) when kept is the current tab, or skip the current tab when searching?

Sorry, something went wrong.

Uh oh!

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

All reactions
@hearnadam hearnadam mentioned this pull request Nov 22, 2026
fix(app): list drafts in the inbox sidebar #65525
Merged
3 of 6 tasks
@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.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Nov 23, 2026
@hearnadam hearnadam closed this Nov 23, 2026
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: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.