Repository navigation
fix(ui): resolve the remaining 7 items of #90 - #118
Conversation
…the catalog Issue #90 item 9. Every successful query, SELECT included, re-ran Tables() and its arrival dropped the completion column cache. Gate the reload on readonly.Check: whatever it cannot prove read-only still reloads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Issue #90 item 6. Submitting an AI prompt reused queryCancel/querySeq, so it cancelled a running query without a word. Ctrl+C and a connection switch now cancel both; Esc in AI mode cancels only the AI request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Issue #90 item 2. Running an entry while navigating reset historyIdx, and the next Ctrl+P saved the executed query over the unexecuted draft. The draft now stays pending until Ctrl+N brings it back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Issue #90 item 5. Export always wrote m.lastResult in query order, ignoring an `s` sort and a focused pinned pane in compare mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…orts Issue #90 item 10. sortedRows parsed both sides on every comparison, and a sort re-measured every cell though only the header indicator changes. Decorate-sort-undecorate with a sortKey that keeps compareValues' pair-by-pair semantics, and cache the widest cell per column in applyResult. 10k-row benchmark: 68.7ms -> 30.3ms, 819k -> 277k allocs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Issue #90 item 11. Rows built from fixed budgets reached 84 cells against a 72-cell wrap width; lipgloss wrapped them and the modal's bottom was cut. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… scroll Issue #90 item 12. The render moved m.detail.scroll on a value receiver, so the move was lost every frame; updateDetail now settles it. The layout assumed one line per value, but long values wrap: fields ran past the modal and the lower border fell off the screen. Fields are now measured, and a single field taller than the modal shows as much of its value as fits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
float64(i) equals ParseFloat's result for the same decimal string, so the integer path no longer parses twice — computeColumnStats' min/max pays no more than before the sortKey change. Note that smartCompare is now test-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ffd53aa49c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if m.historyDraft == "" || value != m.queryHistory[len(m.queryHistory)-1] { | ||
| m.historyDraft = value | ||
| } |
There was a problem hiding this comment.
Track an empty history draft separately
When the editor was empty before entering history, executing a history entry legitimately preserves historyDraft == ""; on the next Ctrl+P this condition treats that valid draft as absent and overwrites it with the executed query. Ctrl+N then returns the executed query instead of restoring the empty editor, so draft presence needs state separate from the draft string's contents.
Useful? React with 👍 / 👎.
An empty editor is a valid draft, but Ctrl+P took historyDraft == "" for "none saved" and replaced it with the query just run from history, so Ctrl+N returned that query instead of the empty editor. A draftPending flag now records whether a draft is saved. (Codex review on #118) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 962abd18dc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if readonly.Check(msg.query) == nil { | ||
| return m, nil |
There was a problem hiding this comment.
Retry catalog loading after an initial failure
When the startup Tables() request fails transiently, sidebar.tables remains empty and there is no successful catalog snapshot. After this change, every successful read-only query returns here without retrying, and the sidebar has no manual refresh action, so table navigation and table-name completion remain unavailable until the user switches connections or executes a write-classified statement. Preserve a failed/not-yet-loaded state and retry the catalog load after a later successful query.
Useful? React with 👍 / 👎.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ui): retry the table list after a failed load Since #118 a read-only query no longer reloads the table list. A load that failed — a timeout on a large catalog at connect, a dropped connection — was then never retried short of a write or a connection switch, leaving the sidebar and table-name completion empty; before, the next SELECT healed it. Record the failure and reload after any query while it stands. (Codex review on #118, unaddressed before merge) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XagFqrp1xwLFWV8NhqmSr4 * perf(ui): pick the export pane without sorting it on `e` `e` called exportSource only to see whether the pane had columns, which sorted every row and then sorted again on export. exportPane picks the pane alone. Also say plainly that the cell-width fallback in applyResultWithSort only notices a change in column count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XagFqrp1xwLFWV8NhqmSr4 * docs(plan,history): record the unreleased #119 fix after v0.12.4 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XagFqrp1xwLFWV8NhqmSr4 * fix(ui): drop a table-list load superseded by a newer one With the retry after a failed load, two queries finishing while a retry is out start two loads on one connection. connGen cannot tell them apart, so an older failure landing after a newer success put back the failure state and its error status, and a late success could put back a stale list. Each load now carries sidebar.loadSeq and only the newest one is applied. (Codex review on #119) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XagFqrp1xwLFWV8NhqmSr4 --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Issue #90 の残り 7 件(項目 2, 5, 6, 9, 10, 11, 12)を 1 件 1 コミットで解消する。機能追加なし。これで #90 は全 12 件対応済み。
exportSourceで表示中のペイン・ソート順を出力((no rows)センチネルは出さない)Tables()再取得 + 補完キャッシュ破棄readonly.Checkが読み取り専用と判定した文では再取得しない(判定不能は再取得)compareValuesの意味論は維持)+ 列ごとのセル最大幅をキャッシュ。1 万行で 68.7ms → 30.3ms。整数キーは float パースを省略clampLines)updateDetailで確定。フィールドを実測高で並べ、1 フィールドがモーダルより高いときだけ値を切る判断の記録は LESSONS.md に 3 エントリ(ffd53aa)。
項目 9 の副作用: 別クライアントが作った/消したテーブルは、asql 側で DDL/DML を実行するか接続を切り替えるまでサイドバーと補完に反映されない(以前は次の SELECT で反映されていた)。サイドバーに再読込キーはないので、外部の変更は接続切替で反映する。
テスト
go vet ./.../go test ./.../govulncheck ./...(0 件)/bash e2e/run.sh(8/8 PASS)🤖 Generated with Claude Code