Skip to content

feat: dashboard decision_level surfacing -- amber unclassified badge + filter (#76 part 1)#106

Merged
Knapp-Kevin merged 1 commit into
BicameralAI:devfrom
Knapp-Kevin:feat/dashboard-decision-level-76
Apr 29, 2026
Merged

feat: dashboard decision_level surfacing -- amber unclassified badge + filter (#76 part 1)#106
Knapp-Kevin merged 1 commit into
BicameralAI:devfrom
Knapp-Kevin:feat/dashboard-decision-level-76

Conversation

@Knapp-Kevin

Copy link
Copy Markdown
Collaborator

Summary

Read-side UI for decision_level in assets/dashboard.html. Pre-existing L1/L2/L3 badges (shipped in #71 / CodeGenome Phase 1+2) are untouched; this PR adds the missing amber Unclassified state for NULL decision_level rows plus a top-bar filter dropdown so reviewers can scope the ledger view to a single level (or to the unclassified backlog).

  • .lvl-unclassified CSS class -- amber rgb(249, 115, 22), sibling of .lvl-l1 / .lvl-l2 / .lvl-l3.
  • renderDec branch for null decision_level -- emits lvl-unclassified badge labeled Unclassified and stamps the row with data-level="unclassified".
  • Each decision row now carries data-level="L1"|"L2"|"L3"|"unclassified" and the decision-row class.
  • New <select id="lvl-filter"> in the topbar (All / L1 / L2 / L3 / Unclassified) wired to a new client-side applyLevelFilter(value) helper.
  • HTML-pattern tests in tests/test_dashboard_unclassified_rendering.py -- six assertions covering CSS, render branch, dropdown markup, filter function. The render path is inline JS, so the tests assert against the source-of-truth template rather than booting a DOM.

Part 1 of 2

Phase 6 of the original plan (inline-edit POST endpoint) is deferred to a follow-up PR. That endpoint calls ledger.queries.update_decision_level, which is being added in the sibling classifier PR (#77 / feat/decision-level-classify-77). Once that helper lands on dev, part 2 ships and closes the remaining slice of #76.

No server changes

Pure HTML/CSS/JS edit plus one new pytest module. No touches to classify/, cli/, handlers/, ledger/queries.py, contracts.py, or server.py -- those are the sibling classifier PR's surface.

Test plan

  • pytest tests/test_dashboard_unclassified_rendering.py -v -- 6 passed in 0.67s
  • python -c "from dashboard.server import get_dashboard_server" -- imports clean
  • ruff check . -- clean
  • ruff format --check . -- 164 files already formatted
  • mypy tests/test_dashboard_unclassified_rendering.py -- no issues
  • Browser spot-check (out-of-band; not blocking PR open)

Labels

flow:feature -- read-side UI surfacing existing classifier output.

Refs

Generated with Claude Code

…+ filter (BicameralAI#76 part 1)

Adds the read-side UI for decision_level. Pre-existing L1/L2/L3
badges (shipped in BicameralAI#71 / CodeGenome Phase 1+2) are preserved; this
PR adds the missing amber 'Unclassified' state for NULL
decision_level rows plus a top-of-table filter dropdown.

- .lvl-unclassified CSS class (amber rgb(249,115,22))
- Rendering branch at line 548 handles null decision_level
- <select id='lvl-filter'> with 5 options
- Each decision row carries data-level='L1'|'L2'|'L3'|'unclassified'
- Client-side JS applyLevelFilter(value) toggles row visibility

No server changes. The companion inline-edit POST endpoint (BicameralAI#76
part 2) ships in a follow-up PR after the sibling BicameralAI#77 classifier PR
lands ledger.queries.update_decision_level.

Refs BicameralAI#76 (part 1 of 2)

Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Knapp-Kevin Knapp-Kevin added the flow:feature Standard feature/fix PR targeting BicameralAI/dev (the default flow) label Apr 29, 2026
@coderabbitai

coderabbitai Bot commented Apr 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d50b3885-cc31-4fa1-b65d-c0927ca2ceb8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Knapp-Kevin Knapp-Kevin merged commit 740bf4a into BicameralAI:dev Apr 29, 2026
5 checks passed
Knapp-Kevin added a commit to Knapp-Kevin/bicameral-mcp that referenced this pull request Apr 29, 2026
…i/ package

Audit found:
- F-1 (BLOCKING): `bicameral/` Python package does not exist; the
  proposed `bicameral/drift_report.py` module would be unbuildable.
  SG-PLAN-GROUNDING-DRIFT instance BicameralAI#3 in this session.
- F-2: dev tip moved 2 commits during planning (PR BicameralAI#106 + BicameralAI#107).

Remediation:
- Replace all 7 references: `bicameral/drift_report.py` →
  `cli/drift_report.py`; `bicameral.drift_report` (CLI module path)
  → `cli.drift_report`.
- Update branch baseline note to current dev tip `c478dd5`.
- The cli/ package was added by PR BicameralAI#107 (decision_level CLI for
  BicameralAI#77); it's the natural home for a CLI-invoked renderer.

The plan's intent is preserved: pure-function renderer + GitHub
Action workflow + sticky-comment poster. Re-audit pending.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flow:feature Standard feature/fix PR targeting BicameralAI/dev (the default flow)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant