Skip to content

fix(plugins): contain Code Review canvas cards and align segmented controls - #3514

Open
Allen Greaves (agreaves-ms) wants to merge 1 commit into
feat/seven-focused-marketplace-pluginsfrom
feat/fix-code-review-canvas-layout
Open

Allen Greaves (agreaves-ms) wants to merge 1 commit into
feat/seven-focused-marketplace-pluginsfrom
feat/fix-code-review-canvas-layout

Conversation

@agreaves-ms

@agreaves-ms Allen Greaves (agreaves-ms) commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Pull Request

Description

Fixes layout overflow and alignment bugs in the Code Review canvas UI (.github/plugins/base/extensions/hve-core/code-review/ui/):

  1. Optional non-functional reviewer cards overflowing their borders (styles.css, app.mjs):
    • Pinned .reviewer-card and .reviewer-grid > li to grid-template-columns: minmax(0, 1fr) (and audited all other single-column display: grid card/list containers — .area-nf, .board-card, .board-col, .board-list, .finding, .finding-groups, .finding-group, .note-card, .hunk-notes, .comment, .replies, .thread-list, .feedback-item, .feedback-list, .readback, .send-list, .outcome-card, .metadata-list, .diagram, .map-preview, .flow, .flow-body, .flow-agents, .flow-reviewers, .flow-group, .nav-list, .nav-sublist, .steer-list, .appearance-menu — adding explicit minmax(0, 1fr) tracks and min-width: 0 / overflow-wrap: anywhere so wide descendants cannot expand implicit grid tracks outside their card borders).
    • Widened .reviewer-grid tracks from 190px to 220px minimum (repeat(auto-fill, minmax(min(100%, 220px), 1fr))).
    • Constrained .reviewer-card .btn (max-width: 100%; min-width: 0; overflow: hidden) with ellipsis truncation on .btn-text, and kept the visible button label concise (+ Add, matching docs/agents/code-review/canvas.md) when Request scope is set to an area while preserving the full area-scoped aria-label, title, and dataset.key.
  2. Narrow-viewport .area-nf horizontal overflow (styles.css):
    • Enabled wrapping on .nf-pending (flex-wrap: wrap; max-width: 100%; min-width: 0) and pinned .area-nf to minmax(0, 1fr) so pending non-functional review badges and Dismiss buttons reflow cleanly down to 320px with zero horizontal page scroll.
    • Allowed the provider .id-chip in .review-meta to ellipsize cleanly below 560px instead of clipping mid-character.
  3. Segmented controls, compact sizing, legend alignment, and legend wrapping (styles.css, dom.mjs, app.mjs, diagram.mjs):
    • Added .segmented.compact label (--cr-control-compact: 24px, 12px font) matching the sibling RPI Workflow canvas, unified .segmented > legend:not(.visually-hidden) vertical centering (display: inline-flex; align-items: center matching control height), and added .appearance-menu .segmented full-width distribution and @media (forced-colors: active) checked segment styling.
    • Extracted a reusable segmented() builder in dom.mjs that wraps option labels in .segmented-options (with padding-inline-start: 1px paired with -1px label border collapse and row-gap: 4px) so wrapped segmented rows align flush with zero left overhang and truncate long area titles cleanly with tooltips.
    • Wrapped each Change map legend swatch and its description in .legend-item so swatches never wrap separately from their label.

Related Issue(s)

Related to #3463 (immediate base in stack #3399).

Type of Change

Select all that apply:

Code & Documentation:

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update

Infrastructure & Configuration:

  • GitHub Actions workflow
  • Linting configuration (markdown, PowerShell, etc.)
  • Security configuration
  • DevContainer configuration
  • Dependency update

AI Artifacts:

  • Reviewed contribution with hve-builder and addressed all actionable findings
  • Copilot instructions (.github/instructions/*.instructions.md)
  • Copilot agent (.github/agents/*.agent.md)
  • Copilot skill (.github/skills/*/SKILL.md)
  • Copilot hook (.github/hooks/*/*.json)
  • Eval spec added/updated for changed AI artifacts (evals/)

Note for AI Artifact Contributors:

  • Agents: Research, indexing/referencing other project (using standard VS Code GitHub Copilot/MCP tools), planning, and general implementation agents likely already exist. Review .github/agents/ before creating new ones.
  • Skills: Must include both bash and PowerShell scripts. See Skills.
  • Model Versions: Contributions MUST target models listed in the model catalog (scripts/linting/model-catalog.json) whose provider appears in providerAllowlist and whose status is ga or preview. Run npm run lint:models to validate references.
  • See Agents Not Accepted and Model Version Requirements.

Other:

  • Script/automation (.ps1, .sh, .py)
  • Other (please describe):

Testing

  • npm run test:code-review: passed (75/75 tests, 17 suites — includes new regression tests in .github/plugins/base/extensions/hve-core/code-review/tests/views.test.mjs).
  • npm run test:extensions: passed (962/962 tests, 176 suites).
  • npm run plugin:validate: passed (plugin manifest and catalog in sync).
  • npm run lint:ts: passed.
  • npm run lint:md: passed.
  • npm run lint:tables: passed.
  • npm run lint:frontmatter: passed.
  • npm run lint:asset-docs: passed.
  • npm run validate:copyright: passed.
  • npm run spell-check: passed.
  • Live Playwright headless Chromium verification against createCanvasServer across 320×800, 360×800, 768×900, 1280×900, and 1920×1080 viewports, Light/Dark/More-contrast themes, Capture, Review (Request scope set to Area: Webhook retry processor, Area: Idempotency ledger & signing verification, and All areas; Coverage board lane dropdown; Change map; Findings; Area non-functional bar; Diff; Discussion), Outcome, Steer drawer/docked, Review and send dialog, Appearance menu, and a 120-character button/URL stress test: 0 layout/containment/overflow violations (down from 1,141 baseline violations), confirmed with before/after screenshot inspection.
  • Not run: npm run validate:local, npm run validate:docs, npm run lint:md-links (no documentation or Markdown files changed).

Checklist

Required Checks

  • Documentation is updated (if applicable)
  • Files follow existing naming conventions
  • Changes are backwards compatible (if applicable)
  • Tests added for new functionality (if applicable)

AI Artifact Contributions

  • Used hve-builder review mode to review contribution
  • Addressed all actionable findings from the hve-builder review
  • Verified contribution follows common standards and type-specific requirements

Required Local Checks

The following local-safe validation commands must pass before merging:

  • Local validation aggregate: npm run validate:local
  • Documentation validation (if docs changed): npm run validate:docs
  • Spell checking: npm run spell-check
  • Link validation: npm run lint:md-links

Security Considerations

  • This PR does not contain any sensitive or NDA information
  • Any new dependencies have been reviewed for security issues
  • Security-related scripts follow the principle of least privilege

Additional Notes

Stacked on top of feat/seven-focused-marketplace-plugins (#3463) for registration on stack #3399.

@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.02%. Comparing base (2037827) to head (d324e83).

Additional details and impacted files

Impacted file tree graph

@@                           Coverage Diff                           @@
##           feat/seven-focused-marketplace-plugins    #3514   +/-   ##
=======================================================================
  Coverage                                   86.02%   86.02%           
=======================================================================
  Files                                         101      101           
  Lines                                       19900    19900           
  Branches                                       65       65           
=======================================================================
  Hits                                        17118    17118           
  Misses                                       2771     2771           
  Partials                                       11       11           
Flag Coverage Δ
docusaurus 90.88% <ø> (ø)
pester 88.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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.

2 participants