fix(board): boot once — stop the issue-list flicker on mount (v0.1.3)#14
Merged
Conversation
…v0.1.3, #13) Both view pages called `boot()` twice: `kit.initPluginView(boot)` (the kit invokes it after the theme/auth handshake) AND a direct `boot()` right after. Two overlapping boot sequences each fetched config and called `load()`, which sets the list to "Loading…" then replaces it with data — so the board cycled Loading→data→Loading→data on mount. The direct call also fired before the auth handshake. - Drop the redundant direct `boot()` on both PAGE and NEW_ISSUE_PAGE — boot only via `kit.initPluginView` (the fallback kit still invokes it immediately when the DS kit can't load, so offline/degraded mode is unaffected). - Harden `load()` with a monotonic token so a slow in-flight fetch that resolves after a newer load() started (rapid tab/filter clicks) drops its stale result instead of clobbering the fresh list. - Regression test: each page boots via the kit exactly once (no direct `boot();`). Closes #13. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow. |
There was a problem hiding this comment.
QA Audit — PR #14 | fix(board): boot once — stop the issue-list flicker on mount (v0.1.3)
VERDICT: WARN (CI non-terminal; leaning PASS on code)
CI Status
- test: in_progress
Diff Review
- Drops the redundant direct
boot()call afterkit.initPluginView(boot)on bothPAGEandNEW_ISSUE_PAGE— the root cause of the double-config+load thrash (#13) - Adds a monotonic
loadSeqtoken toload()so a stale in-flight fetch that resolves after a newerload()started drops its result silently — clean defensive pattern - Guarded the
catchblock'slist.innerHTMLassignment behind the same token check - Version bumps
pyproject.tomlandprotoagent.plugin.yamlin lockstep (0.1.2 → 0.1.3) - Regression test
test_pages_boot_onceasserts each page haskit.initPluginView(boot)and no trailingboot();
Observations
- LOW: CI (
test) is still in progress at review time. PR claims 87 tests pass + ruff clean locally; expect terminal green on re-check. - The monotonic token pattern in
load()is correct: pre-increment, capture, compare afterawait. Thecatchguard (if(my===loadSeq)) correctly prevents a superseded request's error state from overwriting the list. No gap. - No unresolved CodeRabbit threads. No security-sensitive paths touched.
— Quinn, QA Engineer
|
Submitted COMMENT review on #14 — non-blocking while |
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.
Closes #13.
Root cause
Both view pages called
boot()twice:Two overlapping boot sequences each fetched config and called
load(), which sets the list to "Loading…" then swaps in data — so on mount the board cycled Loading → data → Loading → data, the reported flicker/thrash. (The direct call also fired before the auth handshake.)Fix
boot()on bothPAGE(board) andNEW_ISSUE_PAGE— boot only viakit.initPluginView. The fallback kit still invokes the callback immediately when the DS kit can't load, so offline/degraded mode is unaffected.load()with a monotonic token so a slow in-flight fetch that resolves after a newerload()started (rapid tab/filter clicks) drops its stale result instead of clobbering the fresh list — no thrash there either.test_pages_boot_once— each page boots via the kit exactly once.87 tests pass, ruff clean. v0.1.3 (lockstep
pyproject.toml+protoagent.plugin.yaml).🤖 Generated with Claude Code