Skip to content

task description autosave - #98

Merged
danielehrhardt merged 1 commit into
mainfrom
godmode/20-task-description-autosave
Oct 7, 2026
Merged

danielehrhardt merged 1 commit into
mainfrom
godmode/20-task-description-autosave

Conversation

@danielehrhardt

Copy link
Copy Markdown
Contributor

Task descriptions now save as you type

Before this change, a task's description was only saved when you left the editor or clicked Save. Now it saves while you type, so closing the sheet or switching tasks mid-edit no longer depends on a blur event firing. I tested every path below in the browser against a local test instance. Typecheck passes; the desktop app has no unit tests or linter set up.

How it behaves (all in apps/desktop/src/components/tasks/task-sheet.tsx, EditableDescription)

  • Saving while typing: the text saves 700 ms after you stop typing. Only one save runs at a time, and anything typed meanwhile goes out right after it, so an older save can never overwrite a newer one.
  • Cursor stays put: a save coming back from the server no longer reloads the editor, so the text and cursor don't jump.
  • Leaving mid-edit: clicking outside the sheet, switching to another task or closing the app's sheet still saves the latest text, then clears the leftover draft. Reopening the task shows it normally instead of reopening the editor.
  • Failed saves: the text stays in the editor and the footer shows "Not saved" with a Retry button. Typing more also tries again. If it fails after you've already left the editor, the editor reopens with your text, as before.
  • Uploads: saving waits while a pasted or dropped file is still uploading, then catches up.

Footer changes

  • The footer shows "Saving…", "Saved" with a check, or "Not saved · Retry". It shows "Saving…" as soon as the text differs from what was last sent, so it never says "Saved" while changes are still waiting.
  • When nothing has changed yet, it shows a hint: "Saves as you type · paste or drop screenshots and files".
  • "Cancel / Save" is now a single Done ⌘↵ button.

Decision for you: Esc used to throw away the edit; now it keeps the text and closes the editor. Since everything is already saved, I removed Cancel; ⌘Z still undoes inside the editor. If you'd rather keep a way to throw away the whole edit, I can add a "Revert" that restores the text from when editing began.

Tested

  • Typing saved to the server with the editor still open and the cursor in place.
  • With the core stopped, the footer showed "Not saved" and an error toast, and the text stayed. After restarting the core, Retry saved it.
  • Done closes the editor and shows the saved text.
  • Typing and then clicking outside the sheet straight away left the text saved on the server, and reopening the task showed it in normal view. The browser tool is slow between steps, so the regular 700 ms save may have run before the close-time save did; that close-time save itself wasn't isolated.

Screenshots are in /Users/danielehrhardt/.godmode/agents/godmode/workspace/task-20-autosave/ (autosave-saved.png, autosave-not-saved.png).

The commit is 1f6b084, authored as ••••••••, and the branch is already up to date with main.


Task #20 · done by Godmode with Godmode Bot

Edits save 700 ms after the last keystroke, one request at a time, and
once more when the sheet closes or switches tasks. The editor footer shows
Saving / Saved / Not saved with Retry; Esc and Done leave the editor and
keep the text.
@danielehrhardt
danielehrhardt merged commit 6e83efe into main Oct 7, 2026
8 checks passed
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