Skip to content

[Bug] Prompt drafts and history can leak across sessions or directories #750

@Astro-Han

Description

@Astro-Han

What happened?

Prompt composer state can appear in the wrong place when switching between sessions or directories.

Observed user-facing symptoms:

  • A prompt typed on one workspace homepage can show up after switching to another workspace homepage.
  • A prompt typed in one session can appear to carry into another context if the route change goes through the broad draft carry-over path.
  • Pressing ArrowUp can surface prompts from other workspaces because prompt history is currently stored globally.

Investigation found two concrete causes:

  • packages/app/src/components/prompt-input/draft-carryover.ts stores a global last-touched draft and can carry it to another directory when the target is empty.
  • packages/app/src/components/prompt-input/history-navigation.ts persists normal and shell prompt history with Persist.global(...).

File chips also need to be made safe as part of this fix: a file chip selected in workspace A must keep pointing to the original A file if a homepage draft later moves to workspace B.

Which area seems affected?

App flow or product behavior; UI or design system.

How much does this affect you?

Security or data-loss risk.

Steps to reproduce

Cross-directory homepage draft carry-over

  1. Open PawWork in workspace A on the new-session homepage.
  2. Type an unsent prompt in the composer.
  3. Switch to workspace B.
  4. Observe that the prior prompt can appear in workspace B.

Cross-workspace prompt history

  1. In workspace A, send a prompt.
  2. Switch to workspace B.
  3. Focus the composer and press ArrowUp.
  4. Observe that prompts from workspace A can be surfaced in workspace B.

File chip path risk

  1. In workspace A, add a file chip for src/app.ts.
  2. Move the homepage draft to workspace B.
  3. Send from workspace B.
  4. The task executes in B, but the file chip must still point to the original file from A. Today relative file-chip paths can be interpreted against the active directory.

What did you expect to happen?

Prompt drafts and prompt history should have clear ownership boundaries:

  • Homepage drafts may follow the user when switching workspace homepages.
  • Homepage drafts must not appear inside existing sessions.
  • Session drafts should stay with their original session.
  • Prompt history should not cross workspace boundaries.
  • File chips should keep pointing to the file the user selected, even if the homepage draft moves to another workspace.
  • UI may keep showing compact file labels, but internal file references should be absolute.

PawWork version

v2026.5.19

OS version

macOS, exact version not verified in this report.

Can you reproduce it again?

Yes, every time for the code-level draft carry-over and global history behavior identified above.

Diagnostics

Design review draft for the proposed PR1 fix is posted as a separate issue comment:

#750 (comment)

Related follow-up UX improvement, intentionally split out of this bug fix:

#749

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High priorityappApplication behavior and product flowsbugSomething isn't workinguiDesign system and user interface

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions