Skip to content

Review the judge UI and land six patches - #3

Merged
BunsDev merged 1 commit into
mainfrom
ui-review-patches
Sep 21, 2026
Merged

BunsDev merged 1 commit into
mainfrom
ui-review-patches

Conversation

@BunsDev

@BunsDev BunsDev commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

A screenshot-driven review of the judge workspace at desktop, 1024px, and Pixel 7 widths in both themes, followed by six patches. Each has end-to-end coverage.

  1. Shortcuts respect open dialogs. ⌘K and ⌘↵ fired behind the API key dialog, stacking the palette on top of it and running judgments unseen. They are now ignored while another modal is open, and ⌘↵ never fires from inside the palette.
  2. Validation errors clear themselves. "Nothing was sent" lingered until the next run even after the user added text or switched a check on.
  3. Reason-aware stale notice. The notice always blamed "the text or checks", including after saving or removing a key. A new pure describeStaleness helper names what changed ("You switched to live mode. These verdicts are still simulated.") and, when a run can't start, why. Keeps simulated and live verdicts visibly distinct.
  4. Adding a custom check gives feedback. The new chip appeared offscreen with no announcement, unlike removal. Saving now posts a status line and moves focus to the chip.
  5. Threshold moved into the verdicts footer. The slider was buried under every card, far from the "Needs review" count it drives. It now sits in the pinned panel footer on desktop and stacks at phone widths.
  6. "Answer confidence" no longer wraps onto two lines in every result card.

README updated to match.

Verification

Command Result
pnpm check:secrets no secrets found
pnpm lint clean
pnpm typecheck clean
pnpm test 84 passed (5 new)
pnpm build ok
pnpm test:e2e 119 passed, 6 skipped

Skips are the existing desktop-only / phone-only cases plus the new threshold-in-viewport test on mobile, where the panel scrolls with the page by design. Live API paths were exercised only through stubbed routes.

🤖 Generated with Claude Code

- Ignore ⌘K / ⌘↵ while the key dialog is open, and ⌘↵ inside the palette
- Clear a validation error as soon as the workspace no longer has the problem
- Explain staleness: what changed (text, checks, or demo/live mode) and why a
  run can't start, via a pure describeStaleness helper with unit tests
- Announce a newly added custom check and move focus to its chip
- Move the flag threshold into the verdicts panel footer, next to the counts
  it changes, stacking at phone widths
- Keep "Answer confidence" on one line in result cards

Each patch is covered by Playwright specs; README updated to match.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 21, 2026 04:05
@vercel

vercel Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clarity-judge Ready Ready Preview Sep 21, 2026 4:06am UTC

Request Review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Custom-check focus can target the wrong checkbox when names are duplicated.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Improves the judge workspace with safer keyboard shortcuts, clearer stale-result messaging, better validation feedback, custom-check accessibility, threshold placement, and responsive styling.

Changes:

  • Added reason-aware stale notices and self-clearing validation errors.
  • Improved modal shortcuts, custom-check feedback, threshold controls, and result-card layout.
  • Added tests and updated README documentation.
File Summary
README.md Documents updated workspace behavior.
lib/​staleness.ts Adds stale-reason messaging.
lib/​staleness.test.ts Tests staleness behavior.
e2e/​keyboard.spec.ts Covers modal shortcut behavior.
e2e/​judge.spec.ts Covers validation, staleness, and thresholds.
e2e/​custom-checks.spec.ts Covers custom-check feedback and focus.
e2e/​api-key.spec.ts Covers mode-transition stale notices.
components/​SourcePanel.tsx Adds custom-check feedback and focus handling.
components/​ResultsPanel.tsx Moves threshold controls into the footer.
components/​JudgeWorkspace.tsx Integrates stale tracking and shortcut guards.
app/​globals.css Styles the footer and confidence labels.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +75 to +76
const chip = Array.from(panelRef.current?.querySelectorAll<HTMLInputElement>('.field-options input[type="checkbox"]') ?? []).find(
(input) => input.getAttribute("aria-label") === name,
@BunsDev
BunsDev merged commit d8e3f3e into main Sep 21, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — be138db3 Deployed Sep 21, 2026 by vercel[bot]
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