Skip to content

fix(board): boot once — stop the issue-list flicker on mount (v0.1.3)#14

Merged
mabry1985 merged 1 commit into
mainfrom
fix/board-flicker-13
Jun 28, 2026
Merged

fix(board): boot once — stop the issue-list flicker on mount (v0.1.3)#14
mabry1985 merged 1 commit into
mainfrom
fix/board-flicker-13

Conversation

@mabry1985

Copy link
Copy Markdown
Contributor

Closes #13.

Root cause

Both view pages called boot() twice:

kit.initPluginView(boot);   // the kit invokes boot() after the theme/auth handshake
boot();                     // …and a direct call right after

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

  • Drop the redundant direct boot() on both PAGE (board) and NEW_ISSUE_PAGE — boot only via kit.initPluginView. The fallback kit still invokes the callback 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 — no thrash there either.
  • Regression test 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

…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>
@protoquinn

protoquinn Bot commented Jun 28, 2026

Copy link
Copy Markdown

👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow.

@protoquinn protoquinn Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 after kit.initPluginView(boot) on both PAGE and NEW_ISSUE_PAGE — the root cause of the double-config+load thrash (#13)
  • Adds a monotonic loadSeq token to load() so a stale in-flight fetch that resolves after a newer load() started drops its result silently — clean defensive pattern
  • Guarded the catch block's list.innerHTML assignment behind the same token check
  • Version bumps pyproject.toml and protoagent.plugin.yaml in lockstep (0.1.2 → 0.1.3)
  • Regression test test_pages_boot_once asserts each page has kit.initPluginView(boot) and no trailing boot();

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 after await. The catch guard (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

@protoquinn

protoquinn Bot commented Jun 28, 2026

Copy link
Copy Markdown

Submitted COMMENT review on #14 — non-blocking while test CI runs; code is clean and the fix is correct. I'll re-evaluate for a formal PASS/FAIL when CI goes terminal.

@mabry1985 mabry1985 merged commit 702a202 into main Jun 28, 2026
1 check passed
@mabry1985 mabry1985 deleted the fix/board-flicker-13 branch June 28, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue list flickers/thrashes on load before settling

1 participant