Skip to content

Ask before closing a Workspace tab with unsaved edits #342

Closed

Description

@abhishekgahlot2

Closing a file tab in the Workspace panel throws away edits that are not saved yet (typing from the last moment before autosave, or anything left after a failed save) without asking.

Where to start

  1. closeWorkpiece removes the tab without reading the dirty state the panel already tracks (workspaceDirtyRef), and the editor's autosave timer is cleared when the editor unmounts.
  2. When the tab has unsaved edits, save first or ask Save / Discard before closing.
  3. Pull the close decision into a small pure function and test it.

Code to look at:

Done when

  • Closing a tab with unsaved edits saves them or asks first.
  • Closing a clean tab still closes at once.
  • A unit test covers dirty and clean closes.

Free to try

Sign up free at app.useagent.org. New accounts get free model credits (GLM or Claude Opus, up to a limit) and free cloud sandbox time, enough to finish this task without paying or adding a key.

Send it a small task in plain words and watch it work. You'll see the screens this issue is about. The link in the sign-up email works for 24 hours. Not there? Check spam.

Stuck? Comment here with a screenshot and we'll help.

Keep private details out of here

This page is public. Don't post your real email, phone number, address, payment details, API keys, or screenshots that show any of them. Send anything private, including how you'd like to be paid, to [email protected] with a link to your comment here.

Claim it

Comment /take and the issue is assigned to you. First come, first served.

Rules

  • Use the app while you work, and put before and after screenshots or a short recording in your pull request. For backend or docs work, show the result end to end.
  • One change per pull request. Run the checks in CONTRIBUTING.md.
  • AI help is fine, blind AI output is not. You must understand, run and explain every line you submit.
  • Untested or generated pull requests, and pull requests on an issue someone else claimed, are closed without a reply and don't count for Hacktoberfest.

Activity

  1. added
    bug
    help wanted
    hacktoberfest
    on Oct 17, 2026
  2. sharmis-tp commented on Oct 21, 2026

    @sharmis-tp

    I'd like to take this one. I'd have closeWorkpiece read the dirty state already tracked in workspaceDirtyRef and save first or ask Save / Discard before closing, with the close decision pulled into a small pure function and unit tests for dirty, clean and failed-save tabs. When a tab has unsaved edits, would you prefer a silent save first or always asking Save / Discard?

  3. coolestnick commented on Nov 2, 2026

    @coolestnick
    Contributor

    /take

  4. github-actions commented on Nov 2, 2026

    @github-actions

    @coolestnick it's yours. If nothing is pushed within a week, the issue opens up again.

  5. added a commit that references this issue on Nov 5, 2026
    aadb64a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bughacktoberfesthelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions