Skip to content

[Improve] Restore unfinished task prompts - #1637

Draft
roomote-roomote[bot] wants to merge 1 commit into
developfrom
feature/recover-home-prompt-drafts-097qnm2tj9bo1
Draft

[Improve] Restore unfinished task prompts#1637
roomote-roomote[bot] wants to merge 1 commit into
developfrom
feature/recover-home-prompt-drafts-097qnm2tj9bo1

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

​Opened on behalf of @mrubens. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Automatically restore an unfinished task prompt when a signed-in user returns to the Home launcher.
  • Keep drafts browser-local, versioned, and scoped to the current user.
  • Prefer explicit prompt links, clear drafts after successful launches, and retain them when launch fails.

Why this change was made

Reusable prompt libraries are already under active development. This smaller complementary improvement lets users safely draft directly in Roomote instead of keeping unfinished prompts in scattered text files.

Impact

Users can leave the task launcher and return without losing in-progress instructions. Focused interaction tests and repository pre-push checks pass; browser proof was unavailable because the seeded local setup could not reach Home without configuring an inference provider.

@roomote-community

roomote-community Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

1 issue outstanding. See task

  • Home fails during server rendering because draft recovery reads window in the state initializer (apps/web/src/app/(authenticated)/home/Home.tsx:212).

Reviewed 2ea2eac


const [promptText, setPromptText] = useState(promptParam);
const [promptText, setPromptText] = useState(
() => promptParam || readPromptDraft(promptDraftStorageKey),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Home is server-rendered by the dynamic authenticated route, so this lazy initializer also runs without a browser. readPromptDraft then dereferences window.localStorage, causing ReferenceError: window is not defined and preventing the Home page from rendering. Read storage only after mount or guard the server path before touching window.

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