Skip to content

🎨 Palette: Enhance SSP report with dynamic Zero Trust maturity and navigation#150

Open
AGI-Corporation wants to merge 4 commits intomainfrom
palette-ssp-ux-enhancement-11756707536476559921
Open

🎨 Palette: Enhance SSP report with dynamic Zero Trust maturity and navigation#150
AGI-Corporation wants to merge 4 commits intomainfrom
palette-ssp-ux-enhancement-11756707536476559921

Conversation

@AGI-Corporation
Copy link
Copy Markdown
Owner

@AGI-Corporation AGI-Corporation commented Apr 13, 2026

🎨 Palette: SSP Report UX Enhancement

💡 What:
This enhancement transforms the System Security Plan (SSP) report from a static document into a dynamic, visually rich, and navigable report. Key changes include:

  • Dynamic ZT Maturity: The "Zero Trust Pillar Alignment" table now features real-time progress bars calculated from the latest assessments.
  • Improved Navigation: Added "Back to Top" links after major sections to improve usability in long Markdown documents.
  • Contextual Findings: Added a summary line indicating how many findings are being displayed versus the total count.
  • Visual Scannability: Updated status emojis and standardized maturity calculations (0.5 weight for partials) across the reporting system.
  • Code Consistency: Refactored both the dashboard API and SSP report to use a single ZT_PILLAR_DOMAINS constant.

🎯 Why:
The previous SSP report used static placeholders ("See assessment") for Zero Trust alignment, making it difficult for stakeholders to gauge compliance at a glance. Long reports were also difficult to navigate, and users lacked context on the total number of findings.

📸 Before/After:

  • Before: ZT Pillar table had static text "See assessment".
  • After: ZT Pillar table shows visual progress bars like ████░░░░░░ 40.0%.

Accessibility:

  • Improved visual scannability through consistent emoji usage and progress indicators.
  • Enhanced document navigation with internal anchor links.
  • Added descriptive summary text for assessment findings.

PR created automatically by Jules for task 11756707536476559921 started by @AGI-Corporation

Summary by CodeRabbit

  • New Features

    • System Security Plan now displays Zero Trust pillar maturity percentages with visual progress bars.
    • Added "Back to Top" navigation links within the report for easier navigation.
    • Findings display now shows pagination-style text (e.g., "Showing X of Y findings").
  • Style

    • Updated "not implemented" status indicator emoji.

…vigation

- Replace static "See assessment" with dynamic ZT pillar progress bars
- Add "Back to Top" navigation links to the SSP Markdown report
- Add dynamic findings summary line (e.g., "Showing X of Y findings")
- Refactor dashboard and reports to use shared ZT_PILLAR_DOMAINS constant
- Update get_status_emoji for better visual scannability (🛑 -> 🚫)
- Standardize maturity calculation with 0.5 weight for partial implementations
- Add verification tests in tests/test_palette_ux.py

Co-authored-by: AGI-Corporation <186229839+AGI-Corporation@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 13, 2026

Warning

Rate limit exceeded

@AGI-Corporation has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 43 minutes and 25 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 43 minutes and 25 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b11032d2-bda6-4b22-bf32-14e15d0d4831

📥 Commits

Reviewing files that changed from the base of the PR and between 0d0d232 and 9492162.

📒 Files selected for processing (2)
  • backend/routers/reports.py
  • tests/test_palette_ux.py
📝 Walkthrough

Walkthrough

Modified SSP report generation to introduce Zero Trust pillar maturity calculations and visualization. Added a ZT_PILLAR_DOMAINS constant for pillar-domain alignment, a get_maturity_pct() function to compute per-pillar maturity scores, replaced status tables with progress-bar-based maturity tables, and updated emoji for not-implemented assessments. Tests validate new UX elements.

Changes

Cohort / File(s) Summary
Core Maturity Logic
backend/routers/reports.py
Added ZT_PILLAR_DOMAINS constant for pillar→domain mapping; introduced get_maturity_pct() function computing maturity as implemented (full weight) + partial/partially_implemented (half weight); updated generate_ssp() to compute per-pillar maturity percentages, replace status table with maturity table using progress bars, add "Back to Top" anchors, and enhance findings note with occurrence counts; updated get_dashboard() to derive pillar entries from ZT_PILLAR_DOMAINS. Changed not_implemented emoji from 🛑 to 🚫.
Test Assertions
tests/test_palette_ux.py
Extended test_ssp_ux_elements with assertions verifying presence of 🚫 emoji, "Zero Trust Pillar Alignment" and "Maturity" section labels, back-to-top link, and findings count display format.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through pillars tall,
Computing maturity, seeing all—
Progress bars bloom, no stoppers in sight,
Just 🚫 marks and maturity light!
Back to the top, the UX takes flight! 📊

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main changes: enhancing the SSP report with dynamic Zero Trust maturity calculations and navigation features (Back to Top links).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette-ssp-ux-enhancement-11756707536476559921

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.

…vigation

- Replace static "See assessment" with dynamic ZT pillar progress bars
- Add "Back to Top" navigation links to the SSP Markdown report
- Add dynamic findings summary line (e.g., "Showing X of Y findings")
- Refactor dashboard and reports to use shared ZT_PILLAR_DOMAINS constant
- Update get_status_emoji for better visual scannability (🛑 -> 🚫)
- Standardize maturity calculation with 0.5 weight for partial implementations
- Add verification tests in tests/test_palette_ux.py

Co-authored-by: AGI-Corporation <186229839+AGI-Corporation@users.noreply.github.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d0d232ee7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +130 to +134
pillar_assessments = [
a
for a in assessments
if a.control_id.split(".")[0] in domains
or (controls.get(a.control_id) and controls[a.control_id].domain in domains)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Base pillar maturity on full control set, not assessed subset

In generate_ssp, pillar maturity is computed from assessments only, so controls in the pillar that have no current assessment are dropped from the denominator. That means a pillar can show very high (or 100%) maturity when only a small assessed subset is implemented, which materially overstates compliance posture in the SSP. This affects any environment where assessments are partial/incomplete; use the mapped controls for each pillar as the denominator and treat missing assessments explicitly.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
backend/routers/reports.py (2)

178-187: Build the pillar table rows from ZT_PILLAR_DOMAINS to avoid config/content drift.

These rows duplicate the same pillar/domain mapping already defined in code. If the constant changes, markdown can become stale.

♻️ Suggested refactor
@@
-    ssp = f"""# System Security Plan (SSP)
+    zt_rows = "\n".join(
+        f"| {pillar} | {', '.join(domains)} | {get_progress_bar(zt_maturity[pillar])} |"
+        for pillar, domains in ZT_PILLAR_DOMAINS.items()
+    )
+
+    ssp = f"""# System Security Plan (SSP)
@@
 | ZT Pillar | CMMC Domains | Maturity |
 |-----------|--------------|----------|
-| User | AC, IA, PS | {get_progress_bar(zt_maturity["User"])} |
-| Device | CM, MA, PE | {get_progress_bar(zt_maturity["Device"])} |
-| Network | SC, AC | {get_progress_bar(zt_maturity["Network"])} |
-| Application | CM, CA, SI | {get_progress_bar(zt_maturity["Application"])} |
-| Data | MP, SC, AU | {get_progress_bar(zt_maturity["Data"])} |
-| Visibility & Analytics | AU, IR, RA | {get_progress_bar(zt_maturity["Visibility & Analytics"])} |
-| Automation & Orchestration | IR, SI, CA | {get_progress_bar(zt_maturity["Automation & Orchestration"])} |
+{zt_rows}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/routers/reports.py` around lines 178 - 187, The markdown table rows
are hard-coded and duplicate the existing ZT_PILLAR_DOMAINS mapping; replace the
literal rows by iterating ZT_PILLAR_DOMAINS to generate each row and call
get_progress_bar(zt_maturity[pillar]) for the Maturity column so the table stays
in sync; locate the rendering code in reports.py that currently emits the seven
literal rows (references: ZT_PILLAR_DOMAINS, get_progress_bar, zt_maturity) and
build the table lines with a loop over ZT_PILLAR_DOMAINS.items() (or equivalent)
formatting pillar, domains, and progress bar dynamically.

26-34: Consolidate ZT pillar-domain mapping in one shared source.

Line 26 introduces ZT_PILLAR_DOMAINS, but a duplicate map still exists in agents/orchestrator/agent.py (Line 83-91 in provided context). Keeping two canonical copies can drift and produce inconsistent rollups.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/routers/reports.py` around lines 26 - 34, ZT_PILLAR_DOMAINS is
defined here and duplicated in agents/orchestrator/agent.py; extract this
mapping into a single shared constant module (e.g., create or reuse a central
constants or config module) and have both reports.py and
agents.orchestrator.agent import that shared symbol instead of redefining it,
then remove the duplicate mapping from agents/orchestrator/agent.py so there is
only one canonical ZT_PILLAR_DOMAINS used across the codebase.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@backend/routers/reports.py`:
- Around line 178-187: The markdown table rows are hard-coded and duplicate the
existing ZT_PILLAR_DOMAINS mapping; replace the literal rows by iterating
ZT_PILLAR_DOMAINS to generate each row and call
get_progress_bar(zt_maturity[pillar]) for the Maturity column so the table stays
in sync; locate the rendering code in reports.py that currently emits the seven
literal rows (references: ZT_PILLAR_DOMAINS, get_progress_bar, zt_maturity) and
build the table lines with a loop over ZT_PILLAR_DOMAINS.items() (or equivalent)
formatting pillar, domains, and progress bar dynamically.
- Around line 26-34: ZT_PILLAR_DOMAINS is defined here and duplicated in
agents/orchestrator/agent.py; extract this mapping into a single shared constant
module (e.g., create or reuse a central constants or config module) and have
both reports.py and agents.orchestrator.agent import that shared symbol instead
of redefining it, then remove the duplicate mapping from
agents/orchestrator/agent.py so there is only one canonical ZT_PILLAR_DOMAINS
used across the codebase.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 564daf14-3ae6-43e8-a821-ee6079cd6c42

📥 Commits

Reviewing files that changed from the base of the PR and between c9be2df and 0d0d232.

📒 Files selected for processing (2)
  • backend/routers/reports.py
  • tests/test_palette_ux.py

Comment thread tests/test_palette_ux.py
Comment on lines +78 to +82
assert "🚫" in content or "not_implemented" in content
assert "Zero Trust Pillar Alignment" in content
assert "Maturity" in content
assert "[↑ Back to Top](#system-security-plan-ssp)" in content
assert "Showing" in content and "findings" in content
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Tighten assertions to validate the actual UX elements, not fallback text.

Line 78 can pass even if 🚫 regresses, because "not_implemented" appears elsewhere in static content. Line 82 is also too broad for the findings summary format.

✅ More precise assertions
+import re
@@
-        assert "🚫" in content or "not_implemented" in content
+        assert "| Not Implemented | 🚫 " in content
@@
-        assert "Showing" in content and "findings" in content
+        assert re.search(r"Showing\s+\d+\s+of\s+\d+\s+findings", content)

google-labs-jules bot and others added 2 commits April 13, 2026 11:44
…vigation

- Replace static "See assessment" with dynamic ZT pillar progress bars
- Add "Back to Top" navigation links to the SSP Markdown report
- Add dynamic findings summary line (e.g., "Showing X of Y findings")
- Refactor dashboard and reports to use shared ZT_PILLAR_DOMAINS constant
- Update get_status_emoji for better visual scannability (🛑 -> 🚫)
- Standardize maturity calculation with 0.5 weight for partial implementations
- Clean up unused imports and fix PEP8 linting issues in reports router
- Add verification tests in tests/test_palette_ux.py

Co-authored-by: AGI-Corporation <186229839+AGI-Corporation@users.noreply.github.com>
…vigation

- Replace static "See assessment" with dynamic ZT pillar progress bars
- Add "Back to Top" navigation links to the SSP Markdown report
- Add dynamic findings summary line (e.g., "Showing X of Y findings")
- Refactor dashboard and reports to use shared ZT_PILLAR_DOMAINS constant
- Update get_status_emoji for better visual scannability (🛑 -> 🚫)
- Standardize maturity calculation with 0.5 weight for partial implementations
- Clean up unused imports and fix PEP8 linting issues in reports router
- Add verification tests in tests/test_palette_ux.py

Co-authored-by: AGI-Corporation <186229839+AGI-Corporation@users.noreply.github.com>
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.

1 participant