Repository navigation
fix(progress): Keep the pill's popover open on the next question after a send - #147
Conversation
steve-dev-bot
left a comment
There was a problem hiding this comment.
Thanks, this is a nice quality-of-life fix. Answering several questions in a row from the pill is much smoother now. I checked it in a private copy of Paseo with two questions waiting. Before, Send closed the popover. With this branch it moves to the next question ("Question 2 of 2") and closes after the last one, exactly as described. The type check and all 297 tests pass at the head, and the security report in the description matches this head commit.
Two things before it can go in:
- It needs a rebase once #146 is reworked. This branch carries all of #146, which needs changes for the per-workspace progress file that landed on main in #152 (details in my review there). Main has also shipped 1.17.0 and 1.17.1 since, so the changelog line here should move under the new version.
- A held answer counts as answered.
nextWaitingskips any question withgivenset, butgivenalso covers answers in theheldstate. A held answer is one that never went out, for example after the plugin restarted, and its Send button stays enabled so the user can send it again. With the current check, the popover can step past a question that still needs the user. Checkinggiven.state === "sent" || given.state === "queued"(the same testChoiceButtonsuses fordone) would fix it.
Thanks again. Happy to look at it again after the rebase.
…one line per run of reports
…log and the run's bar
…gelog; bump to 1.17.0
…ne; keep job progress out of the ticker
…ta and --detail; scope the tool's progress fields
67e4019 to
189ae49
Compare
…pers to module level for lint
…ith a muted percent and time left under it
…it on a readable line; bound past ETAs and real dates - An agent's report or ticker line replaces only its own earlier line, so its last line still marks where it last saw the run and the "Another session added" notice comes once. A report never folds past another agent's report on the same ticket, which would reorder their fields. - An unreadable line tagged with a workspace no longer counts as where that workspace split off, matching workspaceView. - --eta refuses times more than a year in the past and dates past the month's end, like February 30. - --detail is cut at 200 characters, not UTF-16 units, so no emoji is split.
steve-dev-bot
left a comment
There was a problem hiding this comment.
Thanks, Joshua! The held-answer fix works. A question whose answer is held now comes up next, and Send steps to the next question that still needs an answer. In screenshots of the popover, sending Q3 moves it to Q4, and sending Q4 closes it.
#146 shipped on its own as 1.18.0, so I merged main into this branch and moved your changelog line under a new 1.18.1, with the version bumped to match. Typecheck, all 315 tests, the format check and lint pass. The security review of the change since 1.18.0 found no release blockers, and I've swapped it into the description.
One optional follow-up, not blocking: onSent fires when Send is pressed, before the server replies. So if a send fails or ends up held while the popover is open, the popover still counts that question as answered and can close while it waits. The error toast and the pill count still show it, and 1.18.0 closes after every send anyway, so this is no worse. Counting a question as answered only once the server confirms the send would close that gap.
|
Thanks again, Joshua! This is out in Progress 1.18.1 on npm. Sending an answer from the pill's popover now moves straight to the next question still waiting, so you can answer several in a row without reopening it. The Paseo plugin store still lists 1.17.1 until its review catches up, so |
Why
Answering several questions from the pill above the message box meant reopening the popover after every send: Send closed it, and only the next open landed on the next question.
What changed
Scope
A question counts as answered when its answer is sent or queued (the same check
ChoiceButtonsuses for a done Send button), or when it was sent while this popover was open (the dashboard catches up a moment later, so a quick second send can't step back to it). A held answer never went out, for example after the plugin restarted, so its question still counts as waiting and the popover steps to it. The changelog line sits under 1.18.0, which #146 introduces.Blast Radius
client/pill-popover.tsxonly: the pill's popover. The panel's question dialogs are unchanged.Verification
npm testinprogress/, withTMPDIRoutside the repo: 314 pass. New test "a send steps to a question whose answer is held, but past a queued one" fails without the held-answer fix (the popover closes) and passes with it. The earlier tests for staying open, closing after the last send, and skipping answered questions with a wrap to an earlier one stay.npm run typecheckandoxfmt --check .inprogress/, andnpm run lint(oxlint) at the repo root pass.Security review
No release blockers found.
Full report
Security review: @stevecastaneda/paseo-progress@1.18.1
I found no release blockers in 1.18.1.
Scope and method: I reasoned everything from the source and ran nothing. I had no shell, so I did not run the tests or
npm pack. I read the changedclient/pill-popover.tsxand what it reaches: theQuestionDetailandSendOrCopycomponents inclient/questions.tsx, plusclient/send-answer.ts,shared/answers.tsand the answer-sending path inserver/answers.ts. I also went through the shipped server and client code that touches files, programs, HTML or the network.What changed: only client-side state in the popover. After a Send, the popover now steps to the next question that has no answer out yet, instead of closing. That uses a per-mount
sentset and a "next waiting" lookup that wraps to the top (client/pill-popover.tsx:184,:201-202,:246-252). It adds no new file, program, HTML or network calls.One edge case, not a blocker: because the popover now stays open, a fast double-click on a Send button can land on the next question's button in the same spot. That would send something like
Q2 Awithout the user meaning to. It doesn't break items 1 to 4:answerMessage(shared/answers.ts:33-46) refuses ids that aren't plainQ<n>, so no agent-written text goes out under the user's name.questions.tsx:441,server/answers.ts:174).Places that touch files, programs, HTML or the network
server/system.tsrunProgram/runCommandLine: the only place programs start. They start in Node's own folder (LAUNCH_FOLDER), never the worktree, so Windows' current-folder lookup can't pick up a program the repo committed.server/system.tswriteFileIn/appendFileIn/removeIn/removeLinkIn/makeFoldersIn: names containing..or absolute paths are refused, and no folder along the way may be a symlink. Atomic writes rename over a link instead of writing through it.server/open.ts:29-60(Open on host): fixed commands (explorer,xdg-open,open,plutil) get arguments, not a shell line. The file opened is the real path, checked to be inside the worktree's real path (:77-81), and only images, video, audio, PDFs and text open (:89). So a link named like a picture can't hand a script to the default app.server/open.ts:120-186(preview and video/PDF chunks): an attachment is found only by a reference recorded in the progress file, then checked by real path to be inside the worktree, so no outside or arbitrary path is read. HTML is never previewed (:131). Folder listings skip dotfiles. Sizes are capped.server/progress-file.ts:58-201(progress.jsonl, lock, panel-opened marker): these live in the plugin's state folder under the user's home, named by a hash of the worktree's real path. They never go in the repo or.git, and the lock goes through the same guarded helpers.server/store.ts:15-17(git) and:118-121(saved runs):git -Cruns throughrunProgram. Saved runs are written under the worktree's real path withmakeFoldersIn, which stops at any link or file in the way, and with a rename that replaces a link instead of following it.server/answers.ts:204,server/question-mode.ts:33,64,server/whats-new.ts:109: state files in the plugin's own state folder (answers saved with mode 0600), all throughwriteFileIn/removeIn.server/answers.ts:170-181(sending an answer to the agent): only to the agent named on the question, only if it is in the same workspace and not archived. The message comes fromanswerMessage, so it carries no agent-written text.server/skill.ts:83-149(skill install,paseo plugin ls): writes to the user's skill folders through the guarded helpers. It runs apaseoprogram found by the plugin's own launcher code, starting inLAUNCH_FOLDER. This code is unchanged.server/launcher.ts:135: writes the plugin's own launcher scripts throughwriteFileInwith content the plugin generates. Unchanged.client/attachments.tsx:66-84(links): URLs must be http or https, enforced by the event schema (shared/events.ts:31), and open through Paseo's browser oropenExternalUrl. Local files go through the server checks above.client/attachments.tsx:96-110(page links): a page opens as a Paseo Markdown link to a file inside the worktree, in Paseo's own preview tab. The plugin itself never renders HTML.client/pdf.tsx,client/video.tsx,client/pieces.ts: PDFs and video play from blob URLs built from bytes the server already checked, in Paseo'sDocumentFrameor a<video>tag. No script-running preview gets private files.Textand Paseo'sMarkdowncomponent, never injected as raw HTML. Answers already given are shown as given, not as the user's own work.client/questions.tsx:31-43(Copy): clipboard only, and only on the user's click. The copied text includes the agent's question title, which the user sees before pasting.client/pill-popover.tsx(changed): popover state only. It reaches the Send path above and adds no new access.No release blockers found.