Skip to content

fix(board): comment count (not [object Object]), boot-once, tighter heading (v0.1.4)#17

Merged
mabry1985 merged 1 commit into
mainfrom
fix/board-comments-mount-thrash-heading
Jul 1, 2026
Merged

fix(board): comment count (not [object Object]), boot-once, tighter heading (v0.1.4)#17
mabry1985 merged 1 commit into
mainfrom
fix/board-comments-mount-thrash-heading

Conversation

@mabry1985

Copy link
Copy Markdown
Contributor

Audit + fix of the two open board issues, plus a heading polish. All host-free; ruff + pytest green (91 passed).

#16 — comments show [object Object]

api.py asks gh for the comments field, which — verified against real gh — returns an array of comment objects, not a count. The row did esc(it.comments)String([{…}])[object Object].

  • Render the count: Array.isArray(it.comments) ? it.comments.length : (Number(it.comments)||0), shown only when > 0 with an "N comments" tooltip.
  • Swap 💬 for the Lucide message-square icon — inline SVG (exact v0.468 geometry from the host's own lucide-react), currentColor-themed, no runtime dep / kit icon API.

Closes #16

#15 — issue list thrash on mount (the #13/#14 fix wasn't enough)

The kit's initPluginView callback fires on the initial protoagent:init and every re-theme, and the console re-sends init on the ready ping to close the handshake race — so the single kit.initPluginView(boot) from #14 still fired boot 2+ times on mount. boot wasn't idempotent: each run rebuilt the picker and re-triggered load() (each flashing "Loading…"); the loadSeq token only dedups fetch results, not the visible resets.

  • Guard boot with a booted flag so config-fetch + picker-build + first load() run exactly once. Applied to both pages — the new-issue form had the same latent bug (a re-theme would clobber an in-progress repo selection).

Closes #15

Heading tightening

  • glyph → Lucide refresh-cw icon (consistent with the comment icon).
  • Tighter bar padding/gap; consistent tab height.
  • "Pull Requests" → "PRs" (full label kept as title=) for the narrow right dock.

Tests

Added test_pages_boot_is_idempotent, test_board_renders_comment_count_not_the_array, test_board_heading_uses_icon_actions. Version bumped to v0.1.4 (manifest + pyproject in lockstep).

🤖 Generated with Claude Code

…eading (v0.1.4)

Fixes two board bugs and polishes the heading.

#16 — comments rendered as "[object Object]". `gh issue list --json comments`
returns an ARRAY of comment objects (verified against real gh), not a count;
the row stringified the array. Render `it.comments.length` instead, and swap
the 💬 emoji for the inline Lucide message-square icon (currentColor-themed,
host-free — no runtime dep or kit icon API).

#15 — issue list still thrashed on mount despite #13's "boot once". The kit's
`initPluginView` callback fires on the initial init AND every re-theme (+ the
handshake re-send), so the single boot() still ran repeatedly — each run
rebuilt the picker and re-triggered load(). Guard boot() with a `booted` flag
so it runs exactly once, on both the board and the new-issue form (whose picker
would otherwise clobber an in-progress selection on re-theme).

Heading tightening — refresh glyph (↻) → Lucide refresh-cw icon, tighter bar
padding/gap, and "Pull Requests" → "PRs" for the narrow right dock.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@protoquinn

protoquinn Bot commented Jul 1, 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 #17 | fix(board): comment count (not [object Object]), boot-once, tighter heading (v0.1.4)

VERDICT: WARN (pending CI — test still in_progress)


CI Status

  • test: ⏳ in_progress

Diff Review

  • view.py: comment-count fix correctly computes .length from the array (with numeric fallback), inline Lucide SVGs for comment + refresh icons, booted idempotency guard on both pages — all sound.
  • protoagent.plugin.yaml + pyproject.toml: v0.1.3 → v0.1.4 in lockstep.
  • tests/test_board_view.py: three new string-assertion tests covering the idempotency guard, comment-count render, and icon/heading changes. Consistent with existing test style.

Observations

  • LOW: clawpatch structural review returned 502 (checkout cache miss) — manual diff review substituted; no findings missed on a diff this size.
  • No unresolved CodeRabbit threads. No security, data-loss, or regression risks identified.

Findings are all clean — this is a PASS once CI goes terminal-green.

— Quinn, QA Engineer

@protoquinn

protoquinn Bot commented Jul 1, 2026

Copy link
Copy Markdown

Submitted COMMENT review on protoLabsAI/github-plugin#17.

@mabry1985 mabry1985 merged commit 4869e43 into main Jul 1, 2026
1 check passed
@mabry1985 mabry1985 deleted the fix/board-comments-mount-thrash-heading branch July 1, 2026 05:46
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.

gh comments show [object Object] issue list thrash on mount

1 participant