Skip to content

feat(history): run an entry from the panel, and stop recording phantom failures - #599

Merged
EVWorth merged 1 commit into
mainfrom
feat/history-rerun-and-attribution
Sep 10, 2026
Merged

EVWorth merged 1 commit into
mainfrom
feat/history-rerun-and-attribution

Conversation

@EVWorth

@EVWorth EVWorth commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Closes #325, closes #328.

Stacked on #598 (→ #597 → #593 → #584). The commit to read here is the last one.

Run now (#325)

FR-9.1.4 asked for "click to load; option to execute immediately" and only the first half was built. Right-click now offers Insert into editor, Run now and Delete.

Run now goes to the connection the entry came from, not whichever the sidebar has selected — rerunning yesterday's staging query against production because the selection moved on is the mistake worth designing out.

Entries resolve by connection name, not id: an id is a per-session UUID and stops resolving the moment the app restarts, which is exactly when someone reaches for an old entry.

The item is disabled, with the reason in its tooltip, when that connection is closed or when a credential was redacted out of the statement (#587) — a redacted entry is missing the password it needs and would fail in a way nobody could act on.

"Unknown" entries (#328)

A failed query with no live connection recorded an entry attributed to "Unknown". Fifty of those are fifty rows a user can't act on or trace back to anything. Without a connection the statement never reached a server, so there's no query to remember and nothing is written.

The success path still records, deliberately. The issue proposed skipping both, but a statement that ran and succeeded is a real event, and dropping it because the frontend's connection list is out of step with the backend's would lose more than it saves. That state is a bug in its own right, so it now warns rather than passing silently as an "Unknown" row.

A test-realism note

resultStore.test.ts defaulted to an empty activeConnections, modelling a state the app shouldn't be in — which is why four existing tests failed the moment "no connection" became meaningful. The default is now a connection that exists, and the empty case is tested explicitly for both outcomes.

Verification

3 new store tests, 6 new panel tests. Full suite 1873 passing, 0 lint errors.

…m failures

Two gaps in the same panel.

FR-9.1.4 asked for "click to load; option to execute immediately" and only
the first half was built. Right-clicking an entry now offers Insert into
editor, Run now and Delete (#325).

Run now goes to the connection the entry came from, not whichever one the
sidebar has selected — rerunning yesterday's staging query against
production because the selection moved on is the mistake worth designing
out. Entries record the connection's name rather than its id, because an id
is a per-session UUID and stops resolving the moment the app restarts,
which is exactly when someone reaches for an old entry. The item is
disabled, with the reason in its tooltip, when that connection is closed or
when a credential was redacted out of the statement — a redacted entry is
missing the password it needs and would fail in a way nobody could act on.

Separately, a failed query with no live connection recorded an entry
attributed to "Unknown". Fifty of those are fifty rows a user cannot act on
or trace back to anything (#328). Without a connection the statement never
reached a server, so there is no query to remember and nothing is written.

The success path still records, deliberately, even unattributed: the
statement ran, and dropping a real event because the frontend's connection
list is out of step with the backend's would lose more than it saves. That
state is a bug in its own right, so it now warns rather than passing
silently as an "Unknown" row.

The resultStore tests defaulted to an empty activeConnections list, which
modelled a state the app should not be in. The default is now a connection
that exists, and the empty case is tested explicitly for both outcomes.

Closes #325
Closes #328

Co-Authored-By: Claude Opus 5 <[email protected]>
@EVWorth
EVWorth force-pushed the feat/history-rerun-and-attribution branch from 6583f44 to 83cafc9 Compare September 10, 2026 00:04
@EVWorth
EVWorth merged commit 841c856 into main Sep 10, 2026
12 checks passed
@EVWorth
EVWorth deleted the feat/history-rerun-and-attribution branch September 10, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant