Skip to content

fix: address all CodeRabbit review comments from PR #210 - #211

Merged
ayoub3bidi merged 2 commits into
developfrom
fix/coderabbit-review-comments
Jul 25, 2026
Merged

fix: address all CodeRabbit review comments from PR #210#211
ayoub3bidi merged 2 commits into
developfrom
fix/coderabbit-review-comments

Conversation

@ayoub3bidi

@ayoub3bidi ayoub3bidi commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Resolves all 8 CodeRabbit review comments from PR #210:

  1. Complexity-limit overlay (5 visualizers): Replaced invisible bg-black/30 dimming with opaque bg-black/80 blocking overlay + sign-in prompt text + click handler
  2. ErrorBoundary: Added resetKey prop with componentDidUpdate recovery + visible fallback with "Something went wrong" + "Try again" button
  3. PythonCodePanel focus trap: Moved querySelectorAll(FOCUSABLE) inside the keydown handler to avoid stale NodeList
  4. SettingsSheet focus trap: Added Tab/Shift+Tab cycling in the existing useEffect keydown handler
  5. FR translation: Fixed "Réglages" → "Paramètres" for settings-related keys
  6. Footer LICENSE link: Replaced hardcoded develop-branch URL with GITHUB_REPO_URL/blob/main/LICENSE
  7. ShareExportModal localization: Added t parameter to generateShareCaption(), with template keys in all 3 locales (en/fr/ar)
  8. ShareExportModal state reset: Added useEffect to reset caption and copied state when modal opens

CI: lint ✓ | format ✓ | tests (1907/1907) ✓ | build ✓

Summary by CodeRabbit

  • New Features
    • Added interactive, keyboard-accessible complexity limit prompts with localized guidance across visualizers.
    • Added a default error recovery screen with a “Try again” option and automatic recovery when content changes.
    • Added localized templates for share captions and titles.
  • Accessibility
    • Improved keyboard focus management in settings, code panels, and gated feature prompts.
  • Bug Fixes
    • Updated sharing text when reopening the export dialog.
    • Corrected the license link and refined French settings labels.

@github-actions github-actions Bot added style Improve styling, design, and animation tests labels Jul 25, 2026
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@ayoub3bidi, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0a7bf463-d9c6-4e8b-9815-c6f70dfda116

📥 Commits

Reviewing files that changed from the base of the PR and between 4ea1a5a and 2750219.

📒 Files selected for processing (9)
  • src/components/ArrayVisualizer.jsx
  • src/components/ErrorBoundary.jsx
  • src/components/GraphAlgorithmMatrixVisualizer.jsx
  • src/components/GraphVisualizer.jsx
  • src/components/GridVisualizer.jsx
  • src/components/PythonCodePanel.jsx
  • src/components/SettingsSheet.jsx
  • src/components/TreeVisualizer.jsx
  • src/utils/focusableElements.js
📝 Walkthrough

Walkthrough

Changes

The PR makes complexity-limit overlays interactive and localized across five visualizers, adds default error recovery behavior, improves keyboard focus trapping, localizes share-export templates, updates French settings wording, and corrects the footer license URL.

Complexity gate overlays

Layer / File(s) Summary
Interactive gate rendering
src/components/{ArrayVisualizer,GraphAlgorithmMatrixVisualizer,GraphVisualizer,GridVisualizer,TreeVisualizer}.jsx
Complexity-limit overlays now support click and Enter/Space activation, button semantics, localized title/description text, and gated-feature callbacks.
Gate behavior assertions
src/components/{GraphAlgorithmMatrixVisualizer,GraphVisualizer}.test.jsx
Anonymous complexity-limit tests now expect the darker overlay styling and allow repeated complexity-analysis text.

Error boundary recovery

Layer / File(s) Summary
Fallback and reset behavior
src/components/ErrorBoundary.jsx, src/components/ErrorBoundary.test.jsx
ErrorBoundary renders a default message and retry button when no fallback is supplied, and recovers when resetKey changes.

Keyboard focus management

Layer / File(s) Summary
Panel focus trapping
src/components/PythonCodePanel.jsx, src/components/SettingsSheet.jsx
Focusable elements are queried during Tab handling, with focus wrapping between the first and last panel elements.

Localized share export

Layer / File(s) Summary
Localized caption generation
src/utils/shareCaption.js, src/i18n/locales/{ar,en,fr}/translation.json
Share caption and title generation uses localized templates with algorithm interpolation while retaining fallback text without a translator.
Modal state synchronization
src/components/ShareExportModal.jsx, src/components/ShareExportModal.test.jsx
ShareExportModal refreshes caption state when opened or when algorithm or translations change, and tests support interpolated translations.

License link correction

Layer / File(s) Summary
Repository license URL
src/components/Footer.jsx
The footer license link now targets the repository LICENSE file on the main branch.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the PR’s purpose of addressing review comments, even though it is broad and doesn’t summarize the specific code changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/coderabbit-review-comments

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.

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown

Preview for Bayan Flow Staging ready!

Name Link
🔨 Latest commit 2750219
🔍 Latest deploy log https://github.com/ayoub3bidi/bayan-flow/actions/runs/30163424994
😎 Deploy Preview https://pr-211-bayan-flow-staging.ayoub3bidi.workers.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

Preview alias pr-211 on the staging worker. Updates automatically with new commits.

@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: 3

🤖 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 `@src/components/ArrayVisualizer.jsx`:
- Around line 190-193: Prevent the Space key’s default scrolling behavior before
activating the complexity-limit gate. Update the onKeyDown handlers invoking
onGatedFeatureClick for the recognized Enter/Space keys in
src/components/ArrayVisualizer.jsx lines 190-193,
src/components/GraphAlgorithmMatrixVisualizer.jsx lines 110-113,
src/components/GraphVisualizer.jsx lines 328-331,
src/components/GridVisualizer.jsx lines 189-192, and
src/components/TreeVisualizer.jsx lines 210-213; preserve callback activation
for both keys and ensure preventDefault runs only for recognized activation
keys.

In `@src/components/ErrorBoundary.jsx`:
- Around line 29-54: Update the retry button props in ErrorBoundary.render to
include type: 'button', ensuring clicking “Try again” only resets the boundary
and cannot submit an ancestor form.

In `@src/components/PythonCodePanel.jsx`:
- Around line 89-94: Centralize tabbable-element discovery in a shared filtered
helper, excluding disabled, hidden, inert, and negatively tab-indexed elements.
Update PythonCodePanel.jsx sites at lines 89-94 and 110-114 and
SettingsSheet.jsx lines 36-41 to reuse that filtered list for focus boundaries,
initial focus, and modal wrapping.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 54a7fe26-9ac7-4c1e-8221-4164fb66302b

📥 Commits

Reviewing files that changed from the base of the PR and between c27f8fd and 4ea1a5a.

📒 Files selected for processing (18)
  • src/components/ArrayVisualizer.jsx
  • src/components/ErrorBoundary.jsx
  • src/components/ErrorBoundary.test.jsx
  • src/components/Footer.jsx
  • src/components/GraphAlgorithmMatrixVisualizer.jsx
  • src/components/GraphAlgorithmMatrixVisualizer.test.jsx
  • src/components/GraphVisualizer.jsx
  • src/components/GraphVisualizer.test.jsx
  • src/components/GridVisualizer.jsx
  • src/components/PythonCodePanel.jsx
  • src/components/SettingsSheet.jsx
  • src/components/ShareExportModal.jsx
  • src/components/ShareExportModal.test.jsx
  • src/components/TreeVisualizer.jsx
  • src/i18n/locales/ar/translation.json
  • src/i18n/locales/en/translation.json
  • src/i18n/locales/fr/translation.json
  • src/utils/shareCaption.js

Comment thread src/components/ArrayVisualizer.jsx Outdated
Comment thread src/components/ErrorBoundary.jsx
Comment thread src/components/PythonCodePanel.jsx Outdated
@ayoub3bidi
ayoub3bidi merged commit 9fd279c into develop Jul 25, 2026
15 checks passed
@ayoub3bidi
ayoub3bidi deleted the fix/coderabbit-review-comments branch July 25, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

style Improve styling, design, and animation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant