Skip to content

A scan that failed says so - #99

Open
armada45-pixel wants to merge 1 commit into
tobi:mainfrom
armada45-pixel:failed-scan-says-so
Open

armada45-pixel wants to merge 1 commit into
tobi:mainfrom
armada45-pixel:failed-scan-says-so

Conversation

@armada45-pixel

Copy link
Copy Markdown
Contributor

One of a set of small PRs that replace #87 and #88, one feature each. They touch neighbouring lines in state.rs, views.rs and tests.rs, so whichever merges later will need a rebase; I'll do those as they come up.

When a scan ends in an error there is no walk running and no tree, but the panel in the middle went on showing the spinner, the progress meter, "Reading " and "…all work as soon as it lands", with the error in a box underneath. The side panel's "Worth a look" went on saying "Waiting for the scan". Only a cancelled scan was treated as stopped.

Now a scan that is not running, cancelled or failed, shows no spinner and no meter. A failed one is titled "Could not read "; a cancelled one keeps "Stopped reading ". "Worth a look" says "Nothing was scanned" when there is no scan to wait for. The error box and "Scan again" are unchanged.

A few debug_selectors let the window harness tell the states apart, since it cannot read text.

Verified. cargo xtask lint and cargo xtask test are green on Windows (69 app tests, 157 core). A new window-harness test scans a root that does not exist, draws the reading state, lets the scan fail, draws again and checks the failed title is there while the meter and the "waiting" line are gone.

Not verified. Nothing was run on Linux or macOS. On this branch the feature was exercised through the window-harness tests only; the app was not launched from it. The test relies on a missing root making the scan return an error, which was only observed on Windows.

🤖 Generated with Claude Code

When a scan ended in an error there was no walk and no tree, but the
panel went on showing the spinner, the progress meter and "Reading
<root>", with the error in a box underneath, and "Worth a look" went on
waiting for a scan that was not coming. Only a cancelled scan was
treated as stopped.

Now a scan that is not running shows neither spinner nor meter, a
failed one is titled "Could not read <root>", and "Worth a look" says
nothing was scanned. Debug selectors tell the three states apart for
the window-harness test, which reads a root that is not there.

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