Skip to content

Upload message: fade once the path is at the prompt (2.5.11) - #96

Open
nsleigh wants to merge 1 commit into
ESJavadex:mainfrom
nsleigh:fix/upload-status
Open

nsleigh wants to merge 1 commit into
ESJavadex:mainfrom
nsleigh:fix/upload-status

Conversation

@nsleigh

@nsleigh nsleigh commented Nov 26, 2026 •

Copy link
Copy Markdown

Problem

After a paste, drop or 📎 upload, the panel types the file's path at the prompt and also shows it in the header: 📋 /data/uploads/20261126-003753-pasted.png - inserted at prompt. That message never fades. It stays until another message replaces it or the page is reloaded, and /clear or sending the prompt doesn't remove it. On a phone it takes up about half the header:

image

The path is already at the prompt, so the header adds nothing in that case. There was also a stale tap handler: the message is tap-to-copy, and that handler stayed after a later message replaced it, so tapping the header could copy an old path.

Fix

  • Path typed at the prompt (the normal case): the header shows 📋 Inserted <file name> for 5 seconds, like other messages. Just the name, so it fits on a phone.
  • Path not typed (the terminal wasn't reachable): the full path stays, and a tap copies it, because there it is the only way to get the path in. If copying fails, the path is left selectable to copy by hand.
  • setStatus replaces the previous message completely: its 5-second timer and any tap-to-copy handler go with it. A tap can no longer copy a path that isn't shown, and an older message's timer can no longer clear a newer one.
  • The upload's own "click to select" code, now unused, is removed.

CHANGELOG and version 2.5.11.

Tests

New tests/browser/test-upload-status.mjs, run by npm test next to the key-bar test, in Chromium and WebKit. It serves the real panel page with a fake terminal and upload, and uses Playwright's clock:

  • an upload whose path is typed at the prompt shows "Inserted …" once, isn't tap-to-copy, and fades after 5 seconds;
  • when the terminal can't take the path, the full path stays after a minute and is tap-to-copy;
  • a later message removes the tap handler and fades as usual.

It fails against the current page and passes with this change. The key-bar test still passes.

Tested

On my Home Assistant (dev add-on): pasting and uploading an image on an iPhone and in Chrome on a Mac. The path is typed at the prompt, and the header shows "Inserted …" for about 5 seconds, then clears.

🤖 Generated with Claude Code

Not worth a dedicated release.

After an upload the header kept the full path until something else
replaced it. Show a 5-second 'Inserted <name>' note instead, and keep the
tap-to-copy path only when the path could not be typed at the prompt.
setStatus now drops the previous message's timer and tap handler, so a tap
no longer copies an old path and an old timer can't clear a newer message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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