Skip to content

[codex] Clarify frontier candidate transitions#22

Merged
Jah-yee merged 5 commits into
mainfrom
codex/frontier-guide-help
May 20, 2026
Merged

[codex] Clarify frontier candidate transitions#22
Jah-yee merged 5 commits into
mainfrom
codex/frontier-guide-help

Conversation

@Jah-yee

@Jah-yee Jah-yee commented May 19, 2026

Copy link
Copy Markdown
Member

Summary

This PR clarifies how the frontier visualization should behave without implying a measured continuous loss surface.

  • removes the proposed always-visible frontier guideline concept from the chart behavior
  • keeps the frontier as discrete candidate points, with a small eased movement on the active point so transitions feel less jumpy
  • adds a hidden frontier ? / 前沿 ? explanation dialog instead of placing caveat text in the main UI
  • updates the slider accessibility label from "continuous" to candidate frontier wording

Why

The dashed guide line looked too much like a fitted frontier curve. Aleph currently measures finite candidate prompts, so a permanent line could overstate what the backend has actually observed. The new interaction preserves visual smoothness while keeping the data semantics discrete.

Validation

  • npm run lint
  • npm --workspace web run build
  • git diff --check
  • local browser QA on http://localhost:3000/ for English and Chinese dialog copy, narrow layout, and modal open/close behavior

Out of scope

This does not add backend prompt-neighborhood sampling, prompt edit rescoring, or search traces. Those are still the right path for a future genuinely continuous frontier/loss workflow.

@vercel

vercel Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
aleph Ready Ready Preview, Comment May 20, 2026 3:03am
aleph-web Ready Ready Preview, Comment May 20, 2026 3:03am

@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 578004c5-5c6c-4261-998c-ea88cc626327

📥 Commits

Reviewing files that changed from the base of the PR and between d2f6896 and e8102a5.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • web/app/components/aleph-explorer.tsx
📜 Recent review details
🔇 Additional comments (2)
web/app/components/aleph-explorer.tsx (1)

1129-1133: LGTM!

CHANGELOG.md (1)

10-11: LGTM!


📝 Walkthrough

Walkthrough

Adds a localized "frontier help" modal with keyboard/focus trapping and a footer trigger; shortens slider aria text; and updates the mini frontier chart to use CSS transitions on scatter points for smoother motion.

Changes

Frontier Help Modal Feature

Layer / File(s) Summary
Localization strings for frontier help
web/app/components/aleph-explorer.tsx
Adds English and Chinese STRINGS for the help trigger, aria label, modal title/body, and close label; updates the slider aria wording to "candidate rate-distortion frontier".
Modal state, refs, and keyboard/focus handling
web/app/components/aleph-explorer.tsx
Introduces frontierHelpOpen state and refs for dialog container/close button/previous focus; adds a useEffect to close on Escape, trap Tab focus inside the dialog, and restore focus on cleanup; pick() closes the modal.
Footer trigger and dialog UI
web/app/components/aleph-explorer.tsx
Adds a footer help button that opens the modal; renders an accessible overlay dialog (role="dialog", aria-modal, aria-labelledby) that closes on overlay click and prevents inner click propagation; includes localized content and a close button.

Mini Frontier Chart Animation

Layer / File(s) Summary
Active point transform-based animation
web/app/components/aleph-explorer.tsx
The mini frontier chart's candidate and active scatter points receive transition styling and use transform-based movement for smoother visual updates.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant FooterButton
  participant FrontierDialog
  participant ExamplesPicker
  User->>FooterButton: click help button (open)
  FooterButton->>FrontierDialog: set frontierHelpOpen = true (render)
  User->>FrontierDialog: press Escape
  FrontierDialog->>FrontierDialog: set frontierHelpOpen = false (close)
  User->>FrontierDialog: click overlay background
  FrontierDialog->>FrontierDialog: set frontierHelpOpen = false (close)
  User->>ExamplesPicker: select example (pick)
  ExamplesPicker->>FrontierDialog: set frontierHelpOpen = false (close)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

  • p-to-q/aleph#17: Both PRs modify web/app/components/aleph-explorer.tsx, especially localized UI/accessibility text and mini chart behavior.
  • p-to-q/aleph#7: Also adjusts slider accessibility labeling/ARIA in the explorer UI.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: clarifying frontier candidate transitions by adjusting UI behavior and adding an explanation dialog.
Description check ✅ Passed The description is directly related to the changeset, explaining the rationale, implementation details, and validation steps for the frontier visualization updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/app/components/aleph-explorer.tsx`:
- Around line 2980-3042: The modal rendered when frontierHelpOpen is true needs
a keyboard focus trap and focus restore: wrap the dialog div/section handling
into a focus-management block that (1) on open saves document.activeElement (the
trigger), sets focus into the modal (e.g., the first focusable inside the
section), and adds keydown handlers to trap Tab/Shift+Tab and close on Escape;
(2) when closing via setFrontierHelpOpen(false) restore focus to the saved
trigger; and (3) prevent background focus (make background inert/aria-hidden or
add tabIndex={-1} to non-modal content) so only elements inside the section are
reachable. Locate and update the modal markup around frontierHelpOpen,
setFrontierHelpOpen, headingId and the section to implement these behaviors and
remove the temporary onClick stopPropagation only approach.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9f9e3217-f20d-4068-a622-10f91704f44a

📥 Commits

Reviewing files that changed from the base of the PR and between e7781a8 and c462efa.

📒 Files selected for processing (1)
  • web/app/components/aleph-explorer.tsx
📜 Review details
🔇 Additional comments (1)
web/app/components/aleph-explorer.tsx (1)

725-730: LGTM!

Also applies to: 782-782, 855-860, 911-911, 1494-1494, 1580-1587, 1698-1698, 1124-1124, 1128-1137, 2949-2966

Comment thread web/app/components/aleph-explorer.tsx

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/app/components/aleph-explorer.tsx`:
- Around line 1128-1136: Active dot is being positioned with a CSS pixel
translate and drifts when SVG scales; change the <circle> to use SVG viewBox
coordinates by assigning cx={f1(activeCX)} and cy={f1(activeCY)} (using the
existing f1, activeCX, activeCY symbols) instead of the style transform, and
remove the transform translate(${f1(activeCX)}px, ${f1(activeCY)}px) from the
style; keep any transitions that apply to SVG attributes (e.g., radius) or move
them to SVG-friendly animations so the active point scales with the chart.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9a90572e-072c-4061-8674-a4f12357ddf2

📥 Commits

Reviewing files that changed from the base of the PR and between c462efa and d9b418c.

📒 Files selected for processing (1)
  • web/app/components/aleph-explorer.tsx
📜 Review details
🔇 Additional comments (1)
web/app/components/aleph-explorer.tsx (1)

725-730: LGTM!

Also applies to: 782-782, 855-860, 911-911, 1124-1124, 1494-1506, 1583-1621, 1732-1732, 2983-3000, 3014-3078

Comment thread web/app/components/aleph-explorer.tsx Outdated

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CHANGELOG.md`:
- Around line 5-9: Add a new bullet to the CHANGELOG.md noting the accessibility
label update for the slider: state that the slider label was changed from
wording referencing "continuous" to wording referencing the "candidate frontier"
(and include the localized variant if applicable, e.g., the `前沿` label), so
users and assistive-tech consumers are aware of the accessibility improvement
and its localization; update the existing section near the other
frontier/help-dialog bullets and keep tone consistent with the other entries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d4947778-623e-49c2-a889-a8aecb397b21

📥 Commits

Reviewing files that changed from the base of the PR and between d9b418c and d2f6896.

📒 Files selected for processing (1)
  • CHANGELOG.md

Comment thread CHANGELOG.md
@Jah-yee
Jah-yee merged commit 7a4f18d into main May 20, 2026
5 checks passed
@Jah-yee
Jah-yee deleted the codex/frontier-guide-help branch May 20, 2026 03:05
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