Skip to content

fix: history count on delete, SQLite Design Table, tests - #899

Merged
EVWorth merged 3 commits into
mainfrom
claude/hopeful-bardeen-1k4d1h
Oct 25, 2026
Merged

EVWorth merged 3 commits into
mainfrom
claude/hopeful-bardeen-1k4d1h

Conversation

@EVWorth

@EVWorth EVWorth commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Three follow-ups filed during the UX batches, one commit each. Written by an implementer-frontend subagent.

  • fix: History "N of M" count stays high after a delete #887: deleting a history entry now lowers the "N of M" count, but only when the deleted entry was one of the loaded matches. After the delete succeeds, the facets are re-read; they are distinct values without counts, so there is nothing to decrement. If the delete fails, the entries and the count are restored.
  • fix: Design Table is offered for SQLite tables #889: "Design Table" is hidden for SQLite tables, the same way "New Table…" is. The designer only works with MySQL.
  • test: SchemaTree mock leak and a test that can't fail #890:
    • SchemaTree.test.tsx now restores the real executeQuery after each test. Three tests replaced it with a mock and never put it back, so later tests ran against the mock.
    • The TableDesigner "removes a column on trash click" test now checks that the column count drops by one. Before, it asserted >= 0, which can never fail.

Closes #887. Closes #889. Closes #890.

Test plan

  • Full jsdom suite: 3,457 passed.
  • npm run type-check and dprint are clean. Lint shows one warning fewer (the unused initialCount).
  • Each fix was checked by reverting it and watching its new test fail. For the executeQuery leak, I used a temporary probe test, now removed.

One small race is left as it was: a history read that is already in flight when you delete can bring the deleted row back. Fixing it properly means refreshing after the delete, because bumping the read generation would also discard a legitimate filter change.


Generated by Claude Code

Removing a history entry dropped the row but left the match count and
the filter facets as they were, so the panel kept reading "N of M" for
the old total. Lower the count when the removed entry was a loaded
match, re-read the facets after the delete succeeds, and restore the
count if the delete fails.

Closes #887.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
The table designer reads and writes MySQL DDL, but the schema tree's
table menu offered "Design Table" on tables in an open SQLite file.
Hide it there, as "New Table…" already is (#818).

Closes #889.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
SchemaTree tests replaced useResultStore's executeQuery with a mock and
never put it back, so every later test in the file ran against the
mock. Capture the real action and restore it after each test.

The TableDesigner "removes a column on trash click" test assigned an
unused count and asserted a length >= 0, which cannot fail. It now
clicks the trash button and asserts one column fewer.

Closes #890.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
@EVWorth
EVWorth merged commit 6b72cd4 into main Oct 25, 2026
12 checks passed
@EVWorth
EVWorth deleted the claude/hopeful-bardeen-1k4d1h branch October 25, 2026 03:07
@github-actions github-actions Bot mentioned this pull request Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants