Skip to content

Fix cve-2026-55685. - #299

Merged
visahak merged 3 commits into
AgentToolkit:mainfrom
visahak:fix/react-router-cve-2026-55685
Jul 29, 2026
Merged

Fix cve-2026-55685.#299
visahak merged 3 commits into
AgentToolkit:mainfrom
visahak:fix/react-router-cve-2026-55685

Conversation

@visahak

@visahak visahak commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Tests
    • Added a Vitest + React Testing Library suite covering dashboard rendering, navigation to the Namespaces view, and navigation into namespace-scoped entity pages.
    • Mocked network responses for deterministic route assertions, including active navigation styling and expected on-screen content.
  • Chores
    • Updated the routing library to a newer version for improved compatibility.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 49cecc9f-d357-46ab-bfab-a76e286e20ab

📥 Commits

Reviewing files that changed from the base of the PR and between 4335e05 and bc57dc0.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • altk_evolve/frontend/ui/src/App.test.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • altk_evolve/frontend/ui/src/App.test.tsx

📝 Walkthrough

Walkthrough

Updates react-router-dom and adds Vitest coverage for dashboard rendering, namespaces navigation, active navigation state, and namespace-scoped entity routing using mocked API responses.

Changes

Frontend routing

Layer / File(s) Summary
Routing dependency and integration tests
altk_evolve/frontend/ui/package.json, altk_evolve/frontend/ui/src/App.test.tsx
Upgrades react-router-dom to ^7.18.0 and tests dashboard, namespaces, and entity explorer route behavior with deterministic mocked fetch responses.

Estimated code review effort: 2 (Simple) | ~10 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 is concise and matches the security-focused dependency and test changes in this pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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

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.

@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

🧹 Nitpick comments (1)
altk_evolve/frontend/ui/src/App.test.tsx (1)

1-3: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Make RTL cleanup explicit or verify it is configured globally.

Testing Library only auto-cleans when the runner exposes a global afterEach; otherwise each render(<App />) remains mounted across tests. Verify the Vitest setup, or register cleanup explicitly. (testing-library.com)

Proposed fix
-import { render, screen } from '`@testing-library/react`';
+import { cleanup, render, screen } from '`@testing-library/react`';
-import { describe, it, expect, vi, beforeEach } from 'vitest';
+import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
+
+afterEach(() => cleanup());

Also applies to: 24-29

🤖 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 `@altk_evolve/frontend/ui/src/App.test.tsx` around lines 1 - 3, Ensure the App
tests explicitly call React Testing Library’s cleanup after each test, or verify
and use the project’s configured Vitest setup that provides a global afterEach.
Update the test setup around the imported testing utilities and the App test
cases so each render is unmounted before the next test runs.
🤖 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 `@altk_evolve/frontend/ui/src/App.test.tsx`:
- Around line 30-37: Update the fetch mock in the App test to reject or throw
for any URL not explicitly recognized, removing the fallback respond([]) path.
Keep explicit responses for /api/dashboard, /api/namespaces, and the alpha-ns
entities endpoint so unexpected requests fail the test and the existing
assertions remain valid.

---

Nitpick comments:
In `@altk_evolve/frontend/ui/src/App.test.tsx`:
- Around line 1-3: Ensure the App tests explicitly call React Testing Library’s
cleanup after each test, or verify and use the project’s configured Vitest setup
that provides a global afterEach. Update the test setup around the imported
testing utilities and the App test cases so each render is unmounted before the
next test runs.
🪄 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: e2787d16-a5fb-42c6-b91d-855eff025794

📥 Commits

Reviewing files that changed from the base of the PR and between f24d05a and 4335e05.

⛔ Files ignored due to path filters (1)
  • altk_evolve/frontend/ui/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • altk_evolve/frontend/ui/package.json
  • altk_evolve/frontend/ui/src/App.test.tsx

Comment thread altk_evolve/frontend/ui/src/App.test.tsx
@visahak
visahak requested review from evduester and illeatmyhat July 29, 2026 16:36

@evduester evduester left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@visahak
visahak merged commit a4c5cb5 into AgentToolkit:main Jul 29, 2026
19 checks passed
@visahak
visahak deleted the fix/react-router-cve-2026-55685 branch July 29, 2026 16:39
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