fix: auto-scroll focused organization card during keyboard navigation - #2041
karizcloud wants to merge 1 commit into
Conversation
|
@karizcloud is attempting to deploy a commit to the s3dfx-cyber's projects Team on Vercel. A member of the Team first needs to authorize it. |
💬 Faster Reviews & AssignmentsHi @karizcloud, for faster coordination and smoother communication, consider joining our Discord community: 👉 https://discord.gg/jYrbHKtn8t Useful Channels
|
|
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
👋 Thanks for opening a PR, @karizcloud!Your PR has entered the 🚦 PR Review Pipeline.
🔄 Review Flow
A pipeline status comment may appear automatically as your PR progresses. ✅ Contributor Checklist
|
✅ DCO Sign-off VerifiedHi @karizcloud 👋 All commits in this PR contain valid Thank you for following the DCO requirements 🚀 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📜 Recent review details
|
| Layer / File(s) | Summary |
|---|---|
Scroll the focused organization card src/js/app.js |
scrollToFocused() selects the focused article by its rendered position instead of a data-filtered-idx attribute, then uses smooth nearest scrolling with an inline alignment option. |
Estimated code review effort: 2 (Simple) | ~5 minutes
Possibly related PRs
- S3DFX-CYBER/GSoC-Org-Finder-#2003: Also updates scrolling behavior for the Organizations grid.
Suggested labels: bug, frontend
Suggested reviewers: s3dfx-cyber, itzzavdheshh
Poem
I hop through cards in a focused row,
Now hidden picks are brought to show.
Smoothly near, from side to side,
The chosen card will no longer hide.
— A scrolling rabbit 🐇
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title clearly and concisely matches the main change: auto-scrolling the focused organization card during keyboard navigation. |
| Description check | ✅ Passed | The description covers the summary, related issue, change type, testing, and checklist, with only non-critical template items omitted. |
| Linked Issues check | ✅ Passed | The change satisfies #2038 by making the focused card scroll into view using the rendered card list in src/js/app.js. |
| Out of Scope Changes check | ✅ Passed | The PR stays within scope; the only changes are in src/js/app.js and directly support the scrolling fix. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
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.
Comment @coderabbitai help to get the list of available commands.
🚦 PR Review Pipeline
Last updated: Sun, 26 Jul 2026 16:33:44 GMT |
🤖 TENET Agent Review📋 SummaryThis PR addresses a bug in the Organizations section where keyboard navigation failed to automatically scroll the focused card into view. The fix updates the 🔐 Security FindingsNo security issues found. 🧹 Code QualityCode quality looks good. ✅ What's Done Well
📝 Overall Verdict[APPROVE] - A clear bug fix that improves UI usability and code robustness without introducing new issues. |
There was a problem hiding this comment.
No issues found across 1 file
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Focused bug fix that replaces a broken attribute-based card lookup with direct indexing, restoring scroll-to-focus during keyboard navigation. No new behavior, operational, or security tradeoffs introduced.
Re-trigger cubic
Signed-off-by: karizcloud <1006karishmakale@gmail.com>
54edf39 to
eac292b
Compare
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
🤖 TENET Agent Review📋 SummaryThis pull request addresses a bug in the Organizations section where keyboard navigation failed to automatically scroll the focused card into view. The fix updates the 🔐 Security FindingsNo security issues found. 🧹 Code Quality
✅ What's Done Well
📝 Overall Verdict[APPROVE] - The PR provides a clear fix for a UI bug with no apparent security implications. Review powered by TENET Agent 🛡️ | Triggered automatically on PR #2041 |
S3DFX-CYBER
left a comment
There was a problem hiding this comment.
This fixes the keyboard-navigation scroll bug from #2038, where scrollToFocused() was silently failing because it looked up the focused card via data-filtered-idx, an attribute that was never being set anywhere in app.js. The new approach indexes directly into the rendered <article> elements via document.querySelectorAll('#orgGrid article')[focusedIdx], which is simpler and actually works. Fixes #2038 is linked, DCO is signed, the title is correctly lowercase fix:, and it's a tight 1-file +9/−3 diff with no dependency or lockfile changes. No security concerns — pure DOM queries, no innerHTML or untrusted data.
On the index.html inline / src/js/app.js sync rule: I checked, and scrollToFocused — along with the entire keyboard card-navigation feature (focusedIdx, handleNavigationRight/Left/Down/Up, GRID_COLS) — exists only in src/js/app.js, not in index.html's inline script. So there's no sync violation here; the function being fixed only lives in one place. (That the feature is test-mirror-only and not in the production index.html runtime is a pre-existing architectural state, not something this PR introduces, so I'm not holding it against the change.)
The index alignment is sound: updateCardFocus() iterates the same querySelectorAll('#orgGrid article') NodeList with idx === focusedIdx, so cards[focusedIdx] in scrollToFocused() is consistent with how focus is tracked elsewhere. Adding inline: 'nearest' alongside block: 'nearest' is correct for the horizontal component of grid navigation and doesn't change vertical behavior.
Good to go.



Summary
This PR fixes the keyboard navigation scrolling issue in the Organizations section.
What Changed
data-filtered-idxattribute by locating the focused card from the rendered card list.Related Issue
Fixes #2038
Type of Change
Testing
Checklist