Skip to content

feat(dashboard): Process All funnel visibility + in-flight chip + enriching badge (Spec 5)#339

Merged
mitwilli-create merged 1 commit into
mainfrom
feat/process-all-funnel-visibility-2026-05-29-spec5
May 29, 2026
Merged

feat(dashboard): Process All funnel visibility + in-flight chip + enriching badge (Spec 5)#339
mitwilli-create merged 1 commit into
mainfrom
feat/process-all-funnel-visibility-2026-05-29-spec5

Conversation

@mitwilli-create
Copy link
Copy Markdown
Owner

Summary

Spec 5a + 5c + 5b-(i) — three UI changes addressing the same root-cause perception gap raised in the 2026-05-29 handover (Process All "looks stuck" because the multi-stage funnel renders as a flat progress bar; Anthropic's 60s poll + atomic 0→N progress updates feel frozen between polls; modal counts drift from sidebar after batches drain).

Specs shipped

  • 5a — In-flight Anthropic batch chip. NEW lib/in-flight-batch-detector.mjs reads batch/batches-api-state.json + surfaces in_flight_batch in batchLive SSE payload. Client renders an amber ⏳ Anthropic batch in flight · X of N · elapsed Mm Ss · next poll ~Ns chip whenever ANY batch has processing>0, even between orchestrator phases or for sibling-submitted batches. Closes the polling-cadence misread.

  • 5c — Modal live-count binding. _updateLiveCounts now publishes window.__LIVE_COUNTS__ on every SSE tick. _renderProcessAllPhaseA + batch-status modal pipeline_pending cell read from the live global with fallback to the cached pAgg snapshot. Closes the "modal shows 419, sidebar shows 303" drift.

  • 5b-(i) — Apply-now enriching badge. NEW lib/apply-now-enrichment-status.mjs decides per-row badge visibility from intel-refresh-state.json slot completeness. Apply-now rows show a subtle ⏳ enriching chip when load-bearing slots (hm-intel / role-enrichment / team-health) are missing OR row eval_date is newer than last refresh. Calibration signal — never gates, never hides. Pattern aligned with AGENTS.md § Bug class: confidence-label-annotation-not-gating.

Tests

36/36 green across 3 new test files:

  • tests/in-flight-batch-detector.test.mjs — 11/11 pure-function tests, mocked time
  • tests/apply-now-enrichment-status.test.mjs — 14/14 tests covering sentinels + edge cases
  • tests/spec5-renderer-contracts.test.mjs — 11/11 static contract tests pinning renderer wiring

Live verification

Chrome MCP at https://staging-dashboard.careers-ops.com/ at 1440×900 + 720×900:

  • 47 enriching badges rendered in built dashboard/index.html for qualifying apply-now rows
  • Sample tooltip: ⏳ enriching · awaiting hm-intel · missing: hm-intel
  • in-flight-batch-chip code present in inline JS; correctly hidden right now (no batch in flight)
  • __LIVE_COUNTS__ published 3 places + SSE payload includes pipeline_pending + triage_advance_count
  • curl /api/batch-live returns in_flight_batch: null + full live_counts keyset

Full audit at .claude/audit/spec5-funnel-visibility-2026-05-29/notes.md (gitignored).

Pre-existing failures (NOT caused by this PR)

node test-all.mjs result: 77 passed, 2 pre-existing failed, 2 warnings.

Test plan

  • node --test on all 3 new test files (36/36)
  • node --check on lib/ + dashboard-server.mjs + scripts/build-dashboard.mjs
  • node scripts/build-dashboard.mjs (9 inline scripts parse cleanly, 13MB raw → 10MB minified)
  • launchctl bootout + bootstrap dashboard-server (Tahoe nohup-wrapper hard reboot)
  • curl /api/batch-live verifies in_flight_batch + live_counts shape
  • Chrome MCP screenshot at 1440×900 + 720×900 (4 captures saved)
  • grep verification of meta-chip-enriching (47x) + in-flight-batch-chip (2x) + __LIVE_COUNTS__ (3x) in built HTML
  • (post-merge) verify in-flight chip during next Process All
  • (post-merge) verify modal live-count update mid-SSE tick

Rollback

git revert <merge-commit> — Spec 5 is purely additive (in-flight chip + enriching badge + live-count override all degrade gracefully to absent/cached inputs when their data is missing).

🤖 Generated with Claude Code

…iching badge

Spec 5a + 5c + 5b-(i) — three UI changes addressing the same root-cause
perception gap raised in handover 2026-05-29 (multi-stage funnel rendered
as flat progress bar; Anthropic 60s poll + atomic 0→N updates feel
"stuck"; modal counts drift from sidebar after batches drain).

- Spec 5a: NEW lib/in-flight-batch-detector.mjs reads
  batch/batches-api-state.json + surfaces in_flight_batch in batchLive
  SSE payload. Client _renderBatchData renders an amber
  "⏳ Anthropic batch in flight · X of N · elapsed Mm Ss · next poll ~Ns"
  chip whenever ANY batch has processing>0, even between orchestrator
  phases or for sibling-submitted batches. Closes the polling-cadence
  misread.

- Spec 5c: _updateLiveCounts publishes window.__LIVE_COUNTS__ on every
  SSE tick. _renderProcessAllPhaseA + batch-status modal
  pipeline_pending cell now read from the live global with fallback to
  the cached pAgg snapshot. Closes "modal shows 419, sidebar shows 303"
  drift.

- Spec 5b-(i): NEW lib/apply-now-enrichment-status.mjs::isRowEnriching →
  apply-now rows show subtle "⏳ enriching" amber chip when intel-refresh
  state shows missing load-bearing slots (hm-intel / role-enrichment /
  team-health) for that row, OR when row eval_date is newer than last
  refresh. Calibration signal — never gates, never hides. Pattern aligned
  with AGENTS.md § Bug class: confidence-label-annotation-not-gating.

Tests: 36/36 green
  - 11/11 in-flight-batch-detector unit tests (pure-function, mocked time)
  - 14/14 apply-now-enrichment-status unit tests (sentinel + edge cases)
  - 11/11 spec5-renderer-contracts static contract tests (renderer wiring)

Live verification (Chrome MCP at https://staging-dashboard.careers-ops.com/
  at 1440x900 + 720x900): 47 enriching badges in built HTML; sample
  tooltip "⏳ enriching · awaiting hm-intel · missing: hm-intel";
  in-flight chip code present + correctly hidden when no batch in flight;
  __LIVE_COUNTS__ published 3 places + SSE payload includes
  pipeline_pending + triage_advance_count.

Screenshots: .claude/audit/spec5-funnel-visibility-2026-05-29/notes.md

Pre-existing test-all.mjs failures unrelated to this PR (flagged in
predecessor's session notes): verify-pipeline.mjs row-column-swap;
canonical_url invariant #2211 (separate sibling-instance WIP — preserved
untouched in working tree).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

⚠️ Critical file overlap detected

This PR modifies files that are also modified by one or more other open PRs.
Merging in the wrong order can produce structural merge conflicts.


⚠️  CRITICAL FILE OVERLAP DETECTED
============================================================

PR #339 shares critical files with 2 other open PR(s).
These files need to be merged in sequence to avoid structural conflicts.

  PR #338 "feat(drawer): content-quality sweep — Spanish stripper + voice fix + overclaim scrubber + generic-template removal"
    Branch: feat/drawer-content-quality-sweep-2026-05-29-claude-e1743b34
    Overlap: scripts/build-dashboard.mjs

  PR #319 "fix(dashboard): consistent 'Deep Refresh' capitalization across 10 user-visible labels"
    Branch: fix/dashboard-deep-refresh-button-rename-2026-05-29
    Overlap: scripts/build-dashboard.mjs

Options:
  1. Merge the other PR first, then rebase this branch onto main
  2. Coordinate with the other PR author to split responsibility
  3. If your changes are independent sections, proceed — but rebase after the other PR merges

See AGENTS.md § Bug class: pr-conflict-mirage-from-parallel-shipping

This is a warning, not a block. CI still passes. Merge order matters — coordinate before merging.

See AGENTS.md § Bug class: pr-conflict-mirage-from-parallel-shipping for the triage + recovery playbook.

@mitwilli-create mitwilli-create merged commit fe0b1ad into main May 29, 2026
10 checks passed
mitwilli-create pushed a commit that referenced this pull request May 29, 2026
Documents the 2026-05-29 Spec 5 work merged at fe0b1ad:
- in-flight Anthropic batch chip (Spec 5a)
- modal live-count binding via window.__LIVE_COUNTS__ (Spec 5c)
- apply-now enriching badge (Spec 5b-i)

Includes file-by-file breakdown, verification log, sibling-WIP
coordination state, and post-merge action items.

Audit: .claude/audit/spec5-funnel-visibility-2026-05-29/notes.md

[skip-ui-verify] — CLAUDE.md docs only, no UI code touched.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant