Repository navigation
fix(zbugs): open the first issue on launch in zbugs-gpui and zbugs-rune - #190
Merged
Merged
Conversation
As zbugs-swift does since #183: with no saved selection, zbugs-gpui and zbugs-rune opened with no issue selected. Now each selects the list's first issue once the list has rows. A saved selection still comes first, and it happens once per launch, so deleting the selected issue later still leaves none selected. The e2e runs check it: zbugs-gpui's online run starts with nothing saved and waits for the list's first issue to be selected, and e2e.sh launches zbugs-rune with empty settings and compares the selection it saves with the first open issue in Postgres. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d36c-4ffc-7241-95ec-d56d1643dc77 Co-authored-by: tmm <tmm@tmm.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As zbugs-swift does since #183: with no saved selection, zbugs-gpui and zbugs-rune opened with no issue selected. Now each selects the list's first issue once the list has rows. A saved selection still comes first, and this happens once per launch, so deleting the selected issue later still leaves none selected (the gpui e2e relies on that).
select_first, run from the existingobserve_selfhook, selects the first row of the live list.apply_issuesselects the first row the first time the list has rows.Both e2e runs now check it: zbugs-gpui's online run, which starts with nothing saved, waits for the list's first issue to be selected. e2e.sh launches zbugs-rune with empty settings and compares the selection it saves with the first open issue in Postgres (modified desc, then id).
Checked on a Mac (macOS 27) against zbugs' backend on Postgres 17: fmt, clippy (gpui with and without
e2e), and tests for both apps; gpui's online e2e, CI's Postgres row check, and the offline run; and rune's e2e.sh. All 10 checks pass, including the new one. With the old rune code, the new check fails: the app shows "No issue selected" and saves no selection.