Skip to content

274: aggregated gap bar UX - live count, next-gap cycling, gate summary - #275

Merged
Mawar2 merged 2 commits into
mainfrom
feature/KAI-274-gap-bar-ux
Jun 11, 2026
Merged

274: aggregated gap bar UX - live count, next-gap cycling, gate summary#275
Mawar2 merged 2 commits into
mainfrom
feature/KAI-274-gap-bar-ux

Conversation

@Mawar2

@Mawar2 Mawar2 commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Closes #274

What

Replaces the per-gap callout spam from #269 with an aggregated, live gap UX (researched against GOV.UK error summary, Grammarly, and VS Code Problems-panel patterns):

  • One gap bar per section (data-gapbar): "N unresolved gaps" count + Next gap › (cycles selection through [GAP: ...] markers, wrapping) + Show list (expands the missing-fact texts on demand). Replaces N stacked callouts each with their own "Find in text" button.
  • Live recount (gapScriptJS, shared by /editor and the workspace gate): a client-side mirror of finalreview.GapTexts recounts on every keystroke — the bar, amber textarea tint, rail dot, and gate summary all clear the moment the last gap is filled, no reload. This fixes the stale "Find in text" buttons that never went away.
  • Review-gate summary (gapSummary/summarizeGaps): one GOV.UK-style block at the top — "N unresolved gaps across M sections" with anchor links to each section. Hidden at zero gaps.
  • De-duplicated gate banners (openNonGapFlags): persisted per-gap "Unresolved gap" flags no longer render as gapflag banners — the summary + bars own gap reporting (previously each gap was reported twice at the gate).
  • CSS gotcha fix: .ed-flag { display:flex } beats the UA [hidden] default, so hidden bars rendered as "0 unresolved gaps" callouts; .ed-gap[hidden] etc. re-assert display:none (pinned by test).

Unchanged: gap-warn textarea tint, .gap-mark read-only highlighting, section-rail warn dots, finalreview.GapTexts as the single source of truth for the marker grammar.

Testing (TDD)

  • Tests written first and watched fail: single visible bar for a 2-gap section (editor + gate), summary headline/anchors, hidden-bar/hidden-summary zero states, recount script presence, [hidden] CSS rule, summarizeGaps pluralization, openNonGapFlags filtering.
  • Full suite green (go test ./...), golangci-lint 0 issues, gofmt clean. (-race requires cgo, unavailable on the dev box — CI runs it.)
  • Manually verified on a local offline dashboard with seeded gaps: live count-down, bar disappearance at zero, next-gap cycling, gate summary updates.

Scope

internal/dashboard/ only (editor.go, proposals_templates.go, proposals.go, handler.go, tokens.go + tests). No Opportunity schema, Store, or agent-contract changes.

🤖 Generated with Claude Code

Metatech8 and others added 2 commits June 11, 2026 16:54
Replace the per-gap callout spam (issue #269 UI) with the aggregated gap
UX from issue #274: one live-count gap bar per section with next-gap
cycling and an on-demand list, a GOV.UK-style summary at the review gate,
and client-side recounting so the bar clears the moment a gap is filled.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The design system sets display:flex on .ed-flag, which beats the UA
stylesheet default for the [hidden] attribute - so clean sections showed
zero-count gap bars. Re-assert display:none for hidden gap bars, the
gate summary, and the collapsed gap list.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🤖 AI Code Review (Gemini 2.5 Pro)

No issues found

Diff size: 27577 bytes | Reviewed by Gemini 2.5 Pro with thinking

@Mawar2
Mawar2 merged commit ec59041 into main Jun 11, 2026
17 checks passed
@Mawar2
Mawar2 deleted the feature/KAI-274-gap-bar-ux branch June 11, 2026 22:22
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.

Gap UX: replace per-gap callout spam with aggregated gap bar + live count

2 participants