Skip to content

[Feat] Save and reuse named personal prompt templates - #2396

Draft
roomote-roomote[bot] wants to merge 1 commit into
developfrom
feature/named-prompt-templates-1d3goc95whgyr
Draft

[Feat] Save and reuse named personal prompt templates#2396
roomote-roomote[bot] wants to merge 1 commit into
developfrom
feature/named-prompt-templates-1d3goc95whgyr

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

​Created by Roomote. View the task or mention @roomote-roomote for follow-up asks.

Related issue

No linked issue. Related existing work: #1605 remains open and unmerged; its implementation is absent from this base. This PR implements named templates in the current shared NewTaskForm architecture. Review the overlap before merging either PR.

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

Let users keep named personal prompts and reuse them without retyping, while retaining the existing Session launch flow.

What changed

  • Add a Templates library to the shared Home/New Session composer: save the current prompt with a unique name, load it for review and editing, or delete an individual entry.
  • Preserve exact prompt text in browser-local, account-scoped storage. Templates contain text only, not attachments or settings; loading never launches work.
  • Reject blank inputs and duplicate names, report storage failures without claiming success, and retain all saved entries without eviction. No backend or database migration is introduced.
  • Document browser-local persistence and the save/load/delete workflow.

How it was tested

  • Implementation validation passed: 27 focused PromptTemplates/Home client tests, web fast typecheck, targeted oxlint and ESLint, docs check, and diff whitespace checks.
  • Delivery hooks passed without bypass: staged oxfmt, monorepo oxlint, web/worker residual ESLint, fast typechecks (27 tasks), and knip. Knip emitted one non-failing configuration hint about the docs mint ignore entry.
  • Genuine desktop/mobile Home browser checks covered save/load/delete and Enter-to-save without launching. Screenshot-only evidence is below.
  • The shared New Session dialog and live execution were not browser-tested; launch integration tests use a mocked launch boundary. Browser proof and focused tests preceded an unrelated base update to ModelSelect; delivery static checks passed on the updated base.

Checklist

  • The PR title follows the repo convention: [Fix], [Feat], [Improve], [Refactor], [Docs], or [Chore] followed by a user-facing description
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset

The exact full lint/typecheck commands and changeset generation were not run; the successful fast/static checks are listed above.

Screenshots

Desktop Home prompt template library

Mobile Home prompt template library

@roomote-community

roomote-community Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

1 issue outstanding. See task

  • Prompt template saves can silently drop a concurrent browser tab's change (apps/web/src/components/tasks/PromptTemplates.tsx:85).

Reviewed 03898f9

}
try {
// Re-read before each action so another composer cannot overwrite newer entries.
const current = readTemplates();

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.

The read-modify-write sequence is not atomic across browser tabs. Two tabs can both read the same library, append different templates, and then each setItem, so the later write silently drops the other template despite the stated no-eviction behavior. Serialize mutations per storage key (or otherwise merge/retry after detecting a competing write) before claiming this protects concurrent composers.

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