Skip to content

added interactive identity panel and track search system#59

Merged
Devnil434 merged 2 commits into
Devnil434:mainfrom
2024itb047samata:feature/reid-track-recovery
May 16, 2026
Merged

added interactive identity panel and track search system#59
Devnil434 merged 2 commits into
Devnil434:mainfrom
2024itb047samata:feature/reid-track-recovery

Conversation

@2024itb047samata
Copy link
Copy Markdown
Contributor

@2024itb047samata 2024itb047samata commented May 15, 2026

Features Added

  • Interactive identity details panel
  • Searchable track ID system
  • Click-to-select tracking interactions
  • Dynamic surveillance dashboard UI
  • Active track highlighting and animations

Improvements

Summary by CodeRabbit

  • New Features
    • Added search functionality to quickly filter cameras on the dashboard
    • Implemented camera selection with a dedicated details panel displaying selected camera information
    • New identity panel shows active track status in real-time

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Warning

Rate limit exceeded

@2024itb047samata has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 42 minutes and 20 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 87bdda85-6945-4ec8-82c8-9a6db83c9813

📥 Commits

Reviewing files that changed from the base of the PR and between 647e4e7 and eba1a27.

📒 Files selected for processing (1)
  • apps/dashboard/src/pages/Dashboard.jsx
📝 Walkthrough

Walkthrough

Dashboard refactored from static grid into interactive component with useState-managed search and selection states. Search input filters cameras by trackId, click handlers select cameras and apply styling, and a right-side identity panel conditionally displays selected camera details.

Changes

Interactive Dashboard with Search and Selection

Layer / File(s) Summary
Search, Selection, and Identity Panel
apps/dashboard/src/pages/Dashboard.jsx
Dashboard converted to stateful component with search input filtering cameras by trackId, click handlers setting selectedTrack state with visual styling, and conditional identity panel rendering selected camera title, track ID, and "ACTIVE TRACK" label. Layout changed from single grid to split flex (grid + sidebar).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A dashboard awakes with a search and a click,
Track filtering magic, selection so quick,
Identity panels now shine on the side,
Four static cards dance with interactive pride! ✨

🚥 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 'added interactive identity panel and track search system' directly describes the main changes implemented in the Dashboard component refactoring.
Linked Issues check ✅ Passed The code changes implement all core requirements from issue #49: interactive identity panel, track search/filter, click-to-select interactions, and dynamic UI updates for the surveillance dashboard.
Out of Scope Changes check ✅ Passed All changes are scoped to Dashboard.jsx refactoring to add the identity panel and search functionality; no unrelated modifications were introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ 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.

❤️ Share

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
apps/dashboard/src/pages/Dashboard.jsx (1)

32-40: ⚡ Quick win

Consider adding keyboard navigation support for accessibility.

The clickable camera cards are implemented as <div> elements with onClick handlers, which prevents keyboard users from selecting tracks. For better accessibility, consider making these keyboard-navigable.

♿ Proposed enhancement for keyboard support
  <div
    key={index}
-   onClick={() => setSelectedTrack(index)}
+   role="button"
+   tabIndex={0}
+   onClick={() => setSelectedTrack(index)}
+   onKeyDown={(e) => {
+     if (e.key === 'Enter' || e.key === ' ') {
+       e.preventDefault();
+       setSelectedTrack(index);
+     }
+   }}
    className={`cursor-pointer transition-all duration-300 hover:scale-105 hover:shadow-2xl ${

Note: This suggestion assumes the index mismatch issue is resolved first.

🤖 Prompt for 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.

In `@apps/dashboard/src/pages/Dashboard.jsx` around lines 32 - 40, The camera card
uses a plain <div> with only an onClick (rendered in the block referencing
selectedTrack, setSelectedTrack and index) which is not keyboard accessible;
change the element to an interactive control or add keyboard handlers: make the
element a <button> or add tabIndex={0}, role="button", onKeyDown that triggers
setSelectedTrack(index) for Enter/Space, and include an accessible state
attribute (e.g., aria-pressed or aria-selected) tied to selectedTrack === index
so keyboard and assistive tech can activate and perceive selection.
🤖 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 `@apps/dashboard/src/pages/Dashboard.jsx`:
- Around line 12-18: The search input using value={searchQuery} and
onChange={(e) => setSearchQuery(e.target.value)} lacks an accessible label;
update the input element to include either a visible <label> tied to it (via
htmlFor/id) or add an aria-label (e.g., aria-label="Search Track ID") so screen
readers can announce its purpose—modify the JSX around the existing input
element to add the label or aria-label while keeping the current value and
onChange handlers intact.
- Around line 22-27: The inline camera arrays duplicated in the Dashboard
component should be extracted into a single constant (e.g., CAMERAS) and reused;
create a top-level const CAMERAS = [{ title: "Camera 1", trackId: "P-101" },
...] in the file (or module scope) and replace the three inline array
occurrences inside the Dashboard component with references to CAMERAS so all
usages (rendering, props, or any helper functions) point to the same data
source.
- Around line 31-46: The selectedTrack is being set to the index of the filtered
array, causing a mismatch when the identity panel reads CAMERAS by index; change
the selection to a stable identifier (e.g., cam.trackId) or the camera object
itself and use that in the identity panel. Update the click handler in the map
(where setSelectedTrack is called) to pass cam.trackId (or cam) instead of
index, change the identity-panel lookup (where CAMERAS[...] is used) to find the
camera by trackId (e.g., CAMERAS.find(c => c.trackId === selectedTrack)) or read
selectedTrack.title if storing the object, and update the selected styling check
(currently selectedTrack === index) to compare by id (selectedTrackId ===
cam.trackId) or by reference if storing the object.
- Line 33: The list rendering in Dashboard.jsx is using key={index}, which
should be replaced with a stable unique identifier from each camera object to
avoid incorrect component reuse when filtering; update the mapping in the
Dashboard component (the block that iterates over cameras and currently binds
key={index}) to use a unique property like camera.id or camera.serial (or
compose a stable key like `${camera.id}-${camera.serial}`), and if the camera
objects lack a unique id add one at the data source or derive a deterministic
identifier before rendering.

---

Nitpick comments:
In `@apps/dashboard/src/pages/Dashboard.jsx`:
- Around line 32-40: The camera card uses a plain <div> with only an onClick
(rendered in the block referencing selectedTrack, setSelectedTrack and index)
which is not keyboard accessible; change the element to an interactive control
or add keyboard handlers: make the element a <button> or add tabIndex={0},
role="button", onKeyDown that triggers setSelectedTrack(index) for Enter/Space,
and include an accessible state attribute (e.g., aria-pressed or aria-selected)
tied to selectedTrack === index so keyboard and assistive tech can activate and
perceive selection.
🪄 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

Run ID: 9bd929f7-ddd2-4b63-b033-8f82cccc1856

📥 Commits

Reviewing files that changed from the base of the PR and between 8469d4a and 647e4e7.

📒 Files selected for processing (1)
  • apps/dashboard/src/pages/Dashboard.jsx

Comment thread apps/dashboard/src/pages/Dashboard.jsx
Comment thread apps/dashboard/src/pages/Dashboard.jsx Outdated
Comment thread apps/dashboard/src/pages/Dashboard.jsx Outdated
Comment thread apps/dashboard/src/pages/Dashboard.jsx Outdated
@2024itb047samata
Copy link
Copy Markdown
Contributor Author

Resolved. Kindly review

@Devnil434 Devnil434 merged commit 98caa28 into Devnil434:main May 16, 2026
1 check passed
@2024itb047samata
Copy link
Copy Markdown
Contributor Author

Kindly add GSSoC approved tag and the level of difficulty please in all my prs. Thanks @Devnil434

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add live identity panel and track search functionality

2 participants