Skip to content

fix(settings): enforce maxConcurrentDownloads limit of 1–20 per PRD §6.10#53

Merged
mpiton merged 3 commits intomainfrom
fix/issue-49-max-concurrent-downloads
Apr 14, 2026
Merged

fix(settings): enforce maxConcurrentDownloads limit of 1–20 per PRD §6.10#53
mpiton merged 3 commits intomainfrom
fix/issue-49-max-concurrent-downloads

Conversation

@mpiton
Copy link
Copy Markdown
Owner

@mpiton mpiton commented Apr 14, 2026

Summary

Fixes #49: The settings validation for maxConcurrentDownloads was incorrectly accepting values up to 100, violating the PRD §6.10 specification which limits the maximum to 20.

Changes

• Backend: Updated Rust validation in update_config handler from 1..=100 to 1..=20
• Frontend: Changed settings UI input max constraint from 100 to 20
• Added tests covering the new boundary conditions (rejects 21, accepts 20)
• Updated CHANGELOG.md with the fix

Type

fix


Summary by cubic

Enforces the PRD §6.10 limit by capping maxConcurrentDownloads at 1–20 across backend and settings UI. Fixes #49 and prevents saving invalid values.

  • Bug Fixes
    • Enforce 1–20 for maxConcurrentDownloads in backend validation and settings input.
    • Tests: boundary cases (accept 20, reject 21); safer null checks; routes test derived from ROUTES covering redirects and route count.
    • Housekeeping: add coverage/ and Claude local files to .gitignore, remove stray files, and update CHANGELOG.

Written for commit 13a7ed6. Summary will update on new commits.

Summary by CodeRabbit

  • Bug Fixes

    • Enforced the correct 1–20 range for max concurrent downloads in both backend validation and the settings UI (replacing the previous 1–100 upper bound).
  • Tests

    • Added tests covering config validation for max concurrent downloads, settings input limits, and client-side routing behavior.
  • Documentation

    • Updated changelog and .gitignore entries.

…6.10

- Update backend validation from 1–100 to 1–20
- Update frontend input max attribute from 100 to 20
- Add tests verifying the new constraint boundaries
- Update CHANGELOG.md with the fix
@github-actions github-actions Bot added documentation Improvements or additions to documentation rust frontend labels Apr 14, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 14, 2026

📝 Walkthrough

Walkthrough

This PR tightens maxConcurrentDownloads validation to the PRD-specified range 1–20 (was 1–100), updating backend validation, the Settings UI input, adding tests, and documenting the fix in CHANGELOG.md.

Changes

Cohort / File(s) Summary
Backend validation
src-tauri/src/application/commands/update_config.rs
Restricted max_concurrent_downloads validation from 1..=100 to 1..=20 and updated the validation error message; added unit tests for rejecting 21 and accepting 20.
Settings UI
src/views/SettingsView/DownloadsSection.tsx
Changed SettingNumberInput max prop from 100 to 20.
UI test
src/views/SettingsView/__tests__/Sections.test.tsx
Added test asserting the "Max concurrent downloads" input exists and its max attribute equals '20'.
Routing tests
src/routes/__tests__/routes.test.tsx
Added test suite validating ROUTES integrity (count, uniqueness, required fields) and verifying client-side route reachability and redirects using MemoryRouter.
Changelog & VCS ignore
CHANGELOG.md, .gitignore
Documented the fix under Unreleased → Fixed; added .gitignore entries for .claude/, .codex, AGENT.md, and coverage/.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

configuration

Poem

Hop, hop — I nudge the bounds today,
From one-to-one-hundred, trimmed away.
Backend, UI, and tests in view,
Now twenty is the limit true. 🐇

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Changes to .gitignore (Claude/CI exclusions) and the new routing test suite are out of scope relative to the linked issue #49, which focuses only on maxConcurrentDownloads validation. Remove .gitignore updates and routes test additions, or link them to separate issues; keep changes focused on maxConcurrentDownloads validation and testing.
Docstring Coverage ⚠️ Warning Docstring coverage is 31.71% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main fix: enforcing the maxConcurrentDownloads limit to 1–20 per the PRD specification, matching the core purpose of the changeset.
Linked Issues check ✅ Passed The pull request fully addresses issue #49 by updating backend validation (1..=20), frontend UI constraint (max 20), adding tests for boundary conditions, and updating documentation.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-49-max-concurrent-downloads

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

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 14, 2026

Greptile Summary

This PR correctly enforces the PRD §6.10 limit for maxConcurrentDownloads by tightening the Rust validation range from 1..=100 to 1..=20 and updating the frontend <input max> attribute to match. Boundary tests (rejects 21, accepts 20) are added on both layers.

The PR also bundles 50+ newly committed coverage HTML/JSON artifacts (coverage/), .claude/settings.json, an empty .codex file, and an AGENT.md symlink — none of which belong in a feature-fix commit and all of which should be added to .gitignore and removed from the branch. Additionally, src/routes/__tests__/routes.test.tsx is unrelated to this fix and should be a separate PR.

Confidence Score: 5/5

  • The core validation fix is correct and safe to merge; remaining findings are all P2 housekeeping concerns.
  • Both enforcement layers (Rust backend range check and frontend input max) are updated consistently, the default value (3) is within the new bound, and boundary tests are thorough. All open findings are P2: a misleading test assertion, unrelated added files, and committed generated artifacts. None block correctness.
  • The coverage/ directory, .claude/settings.json, .codex, and AGENT.md should be removed from the branch and added to .gitignore.

Important Files Changed

Filename Overview
src-tauri/src/application/commands/update_config.rs Validation range correctly tightened from 1–100 to 1–20; two well-formed boundary tests added.
src/views/SettingsView/DownloadsSection.tsx Frontend max prop updated from 100 to 20, consistent with the backend change.
src/views/SettingsView/tests/Sections.test.tsx New test guards the max=20 constraint but uses toBeDefined() instead of not.toBeNull(), leaving a misleading assertion gap.
src/routes/tests/routes.test.tsx New routing test file, unrelated to the maxConcurrentDownloads fix; logic is correct but shouldn't be bundled in this PR.
CHANGELOG.md Changelog entry correctly documents the validation fix under [Unreleased] → Fixed.

Sequence Diagram

sequenceDiagram
    participant UI as SettingsView (Frontend)
    participant IPC as Tauri IPC
    participant CMD as UpdateConfigCommand
    participant VAL as validate_config()
    participant STORE as ConfigStore

    UI->>UI: "input max=20 enforced in DOM"
    UI->>IPC: "invoke("settings_update", { patch: { maxConcurrentDownloads: N } })"
    IPC->>CMD: handle_update_config(cmd)
    CMD->>STORE: get_config() → current
    CMD->>CMD: apply_patch(current, patch) → merged
    CMD->>VAL: "validate_config(&merged)"
    alt "N < 1 or N > 20"
        VAL-->>CMD: Err("must be 1-20")
        CMD-->>IPC: AppError::Validation
        IPC-->>UI: error response
    else 1 ≤ N ≤ 20
        VAL-->>CMD: Ok(())
        CMD->>STORE: update_config(patch)
        STORE-->>CMD: updated AppConfig
        CMD-->>IPC: Ok(updated)
        IPC-->>UI: updated config
    end
Loading

Fix All in Claude Code

Reviews (1): Last reviewed commit: "fix(settings): enforce maxConcurrentDown..." | Re-trigger Greptile

Comment on lines +114 to +116
const input = label.closest('div')?.parentElement?.querySelector('input');
expect(input).toBeDefined();
expect(input?.max).toBe('20');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 toBeDefined() doesn't catch a null input element

querySelector returns null (not undefined) when no element matches, so expect(null).toBeDefined() passes silently. If the DOM structure changes and the input can't be found, the first assertion still passes and the failure surface moves to the toBe('20') assertion with a confusing "undefined is not '20'" message. Use not.toBeNull() (or the recommended not.toBeFalsy()) to make the guard meaningful.

Suggested change
const input = label.closest('div')?.parentElement?.querySelector('input');
expect(input).toBeDefined();
expect(input?.max).toBe('20');
expect(input).not.toBeNull();
expect(input?.max).toBe('20');

Fix in Claude Code

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: 8

🧹 Nitpick comments (4)
coverage/layouts/Sidebar.tsx.html (1)

1-217: Consider excluding coverage reports from version control.

This appears to be an auto-generated Istanbul coverage HTML report. Coverage artifacts are typically:

  • Added to .gitignore to keep the repository clean
  • Generated on-demand during CI/CD and stored as build artifacts
  • Published to a coverage service (Codecov, Coveralls) rather than committed

Committing these files increases repository size and creates noise in diffs.

📁 Add to .gitignore
+# Coverage reports
+coverage/
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@coverage/layouts/Sidebar.tsx.html` around lines 1 - 217, This file is an
auto-generated Istanbul coverage HTML (contains the Sidebar.tsx report) and
should not be committed; delete the coverage/layouts/Sidebar.tsx.html from the
repo, add the coverage output pattern (e.g., coverage/ or **/coverage/*.html) to
.gitignore, and update CI to generate and upload coverage artifacts (or publish
to a service) instead of committing; look for references to "Sidebar.tsx" and
the top-level "coverage" directory in the diff to locate the offending artifact.
coverage/lib/index.html (1)

1-131: Avoid committing generated coverage/** HTML artifacts in this fix PR.

These are build outputs (including run-specific timestamps) and add unrelated churn. Keep coverage reports as CI artifacts and ignore coverage/ in VCS.

🧹 Suggested cleanup
# .gitignore
+coverage/
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@coverage/lib/index.html` around lines 1 - 131, The PR includes generated
coverage HTML (e.g., coverage/lib/index.html) which should not be committed;
remove these build artifacts from the branch, add coverage/ to .gitignore, and
unstage/remove the files from git history in this commit (e.g., git rm --cached
coverage/... and commit the removal) so only the source changes remain while CI
stores coverage as artifacts.
src/views/SettingsView/__tests__/Sections.test.tsx (1)

111-117: Make this constraint test resilient and cover the full 1–20 range.

The current selector relies on DOM structure (closest(...).parentElement?.querySelector(...)), which can break on harmless markup changes. Query by accessible role/name and assert both bounds.

♻️ Suggested test update
   it('should cap maxConcurrentDownloads input at 20 per PRD §6.10', () => {
     renderWithQuery(<DownloadsSection config={mockConfig} />);
-    const label = screen.getByText('Max concurrent downloads');
-    const input = label.closest('div')?.parentElement?.querySelector('input');
-    expect(input).toBeDefined();
-    expect(input?.max).toBe('20');
+    const input = screen.getByRole('spinbutton', { name: /max concurrent downloads/i });
+    expect(input).toHaveAttribute('min', '1');
+    expect(input).toHaveAttribute('max', '20');
   });

Based on learnings: Write tests for all public functions and critical paths.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/views/SettingsView/__tests__/Sections.test.tsx` around lines 111 - 117,
Replace the fragile DOM-traversal selector with an accessible query to locate
the numeric input for the DownloadsSection: use getByRole('spinbutton', { name:
/Max concurrent downloads/i }) to get the input element, then assert both
input.min === '1' and input.max === '20' to cover the full 1–20 constraint;
optionally, add a small loop that sets values 1..20 via fireEvent.change and
asserts no validation error to ensure the entire range is accepted.
coverage/api/hooks.ts.html (1)

182-184: Add a test for the invalidateKeys success path.

The embedded source shows Line 182–Line 184 (options?.invalidateKeys loop) is uncovered, which is a cache-consistency path in useTauriMutation.

Based on learnings: Write tests for all public functions and critical paths.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@coverage/api/hooks.ts.html` around lines 182 - 184, Tests are missing for the
invalidateKeys success path inside useTauriMutation; add a unit test that calls
useTauriMutation with options.invalidateKeys set (e.g., an array of query keys),
mock or stub queryClientInstance.invalidateQueries, invoke the mutation's
onSuccess handler (or trigger a successful mutation) and assert that
queryClientInstance.invalidateQueries was called for each key; ensure the test
imports useTauriMutation and supplies a mocked QueryClient or context so the
loop over options.invalidateKeys and calls to invalidateQueries are executed and
verified.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/settings.json:
- Around line 2-4: The PR unintentionally adds .claude/settings.json enabling
"superpowers@claude-plugins-official" which is a tooling/security change
unrelated to the maxConcurrentDownloads fix; either remove that file from the
changeset (revert/remove .claude/settings.json or exclude it from the commit) or
add explicit documented approval and rationale in the commit message and PR
description plus a brief security review note; reference the exact JSON key
"enabledPlugins" and the plugin identifier "superpowers@claude-plugins-official"
when making the change so reviewers can verify the removal or the provided
approval.

In `@AGENT.md`:
- Line 1: AGENT.md currently contains only the placeholder text "CLAUDE.md" —
replace it with actionable agent documentation or remove it; update AGENT.md to
either (a) provide real instructions for using or running the agent (purpose,
setup steps, configuration keys, example commands, and expected behavior) or (b)
convert the placeholder into a clear markdown link and short explanation (e.g.,
"See CLAUDE.md for X, or follow these steps..."); ensure the file includes a
meaningful header/title and a concise commit message describing the change when
committing (use AGENT.md and the referenced "CLAUDE.md" string to locate the
placeholder).

In `@coverage/clover.xml`:
- Around line 7-487: The committed coverage XML contains absolute local paths
(e.g., path="/home/matvei/projets/vortex/src/...") which leak workstation
details; remove the generated file coverage/clover.xml from version control and
stop committing coverage outputs: delete or git rm --cached coverage/clover.xml,
add coverage/ (or coverage/clover.xml) to .gitignore, commit that change, and
re-run CI locally to ensure coverage artifacts are not tracked; optionally
configure your coverage tool (nyc/istanbul or whatever generates clover) to emit
relative paths or strip the project root when regenerating to prevent future
leaks.

In `@coverage/hooks/index.html`:
- Around line 2-145: This PR accidentally includes generated coverage artifacts
(e.g., coverage/hooks/index.html); remove all tracked coverage/** files from the
commit and add a .gitignore rule to ignore coverage/ going forward. In practice,
remove the files from the index (unstage/remove from git tracking), commit that
removal, add "coverage/" to .gitignore and commit the .gitignore change, and
verify the branch no longer contains any coverage/* entries (so only source
changes like the maxConcurrentDownloads validation remain). Also confirm CI
still produces coverage reports but they are not committed.

In `@coverage/layouts/index.html`:
- Around line 2-145: The committed generated coverage artifact
coverage/layouts/index.html should be removed from the PR and coverage output
excluded from source control: revert or remove the file from the commit (undo
the change to index.html), run git rm --cached on the committed coverage file(s)
(or the coverage directory) to stop tracking them, add coverage/ to .gitignore
to prevent future commits, and create a follow-up commit that stages the
.gitignore change and removal so only source/test changes (e.g., your
maxConcurrentDownloads fix) remain in the PR.

In `@coverage/prettify.css`:
- Line 1: Remove committed coverage artifacts and stop tracking them: add an
entry for coverage/ to .gitignore, remove the tracked coverage files from git
history (git rm -r --cached coverage or equivalent) and commit that change, and
update CI to generate and upload coverage reports as CI artifacts or to a
coverage service (Codecov/Coveralls). Also revert/remove the prettify.css
addition from the commit so third-party generated files are not stored in the
repo and ensure future runs write reports only to the coverage/ directory which
is now ignored.

In `@coverage/theme/index.html`:
- Around line 1-131: Remove the generated coverage HTML from the PR by deleting
the coverage index.html for the theme (the file whose <title> is "Code coverage
report for theme" and which contains the <table class="coverage-summary">),
revert that file from this commit, and update commits so only source changes for
the maxConcurrentDownloads validation remain; also ensure coverage outputs are
excluded from future commits by adding the coverage output pattern to the repo's
ignore rules (e.g., .gitignore) and committing that change.

In `@coverage/views/DownloadsView/DownloadsView.tsx.html`:
- Around line 2-225: Remove the generated Istanbul reports: delete the entire
coverage/ directory and any coverage/**/*.html, coverage/**/*.css,
coverage/**/*.js files from the commit and repo (unstage and remove them if
already staged), then add coverage/ (or the patterns coverage/**) to .gitignore
so these artifacts are not tracked in future commits; finally re-commit the
change so the PR only contains the real code edits (the validated
maxConcurrentDownloads logic in update_config.rs and its tests remain
untouched).

---

Nitpick comments:
In `@coverage/api/hooks.ts.html`:
- Around line 182-184: Tests are missing for the invalidateKeys success path
inside useTauriMutation; add a unit test that calls useTauriMutation with
options.invalidateKeys set (e.g., an array of query keys), mock or stub
queryClientInstance.invalidateQueries, invoke the mutation's onSuccess handler
(or trigger a successful mutation) and assert that
queryClientInstance.invalidateQueries was called for each key; ensure the test
imports useTauriMutation and supplies a mocked QueryClient or context so the
loop over options.invalidateKeys and calls to invalidateQueries are executed and
verified.

In `@coverage/layouts/Sidebar.tsx.html`:
- Around line 1-217: This file is an auto-generated Istanbul coverage HTML
(contains the Sidebar.tsx report) and should not be committed; delete the
coverage/layouts/Sidebar.tsx.html from the repo, add the coverage output pattern
(e.g., coverage/ or **/coverage/*.html) to .gitignore, and update CI to generate
and upload coverage artifacts (or publish to a service) instead of committing;
look for references to "Sidebar.tsx" and the top-level "coverage" directory in
the diff to locate the offending artifact.

In `@coverage/lib/index.html`:
- Around line 1-131: The PR includes generated coverage HTML (e.g.,
coverage/lib/index.html) which should not be committed; remove these build
artifacts from the branch, add coverage/ to .gitignore, and unstage/remove the
files from git history in this commit (e.g., git rm --cached coverage/... and
commit the removal) so only the source changes remain while CI stores coverage
as artifacts.

In `@src/views/SettingsView/__tests__/Sections.test.tsx`:
- Around line 111-117: Replace the fragile DOM-traversal selector with an
accessible query to locate the numeric input for the DownloadsSection: use
getByRole('spinbutton', { name: /Max concurrent downloads/i }) to get the input
element, then assert both input.min === '1' and input.max === '20' to cover the
full 1–20 constraint; optionally, add a small loop that sets values 1..20 via
fireEvent.change and asserts no validation error to ensure the entire range is
accepted.
🪄 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: CHILL

Plan: Pro

Run ID: ab514a91-c653-42c7-93b6-3744619d2571

📥 Commits

Reviewing files that changed from the base of the PR and between 6d6532a and 4ba1421.

⛔ Files ignored due to path filters (2)
  • coverage/favicon.png is excluded by !**/*.png
  • coverage/sort-arrow-sprite.png is excluded by !**/*.png
📒 Files selected for processing (59)
  • .claude/settings.json
  • .codex
  • AGENT.md
  • CHANGELOG.md
  • coverage/api/client.ts.html
  • coverage/api/hooks.ts.html
  • coverage/api/index.html
  • coverage/api/queries.ts.html
  • coverage/base.css
  • coverage/block-navigation.js
  • coverage/clover.xml
  • coverage/components/ui/badge.tsx.html
  • coverage/components/ui/button.tsx.html
  • coverage/components/ui/checkbox.tsx.html
  • coverage/components/ui/dropdown-menu.tsx.html
  • coverage/components/ui/index.html
  • coverage/components/ui/input.tsx.html
  • coverage/components/ui/progress.tsx.html
  • coverage/components/ui/tooltip.tsx.html
  • coverage/coverage-final.json
  • coverage/hooks/index.html
  • coverage/hooks/useDownloadEvents.ts.html
  • coverage/hooks/useDownloadProgress.ts.html
  • coverage/hooks/useTauriEvent.ts.html
  • coverage/index.html
  • coverage/layouts/AppLayout.tsx.html
  • coverage/layouts/Sidebar.tsx.html
  • coverage/layouts/StatusBar.tsx.html
  • coverage/layouts/index.html
  • coverage/lib/format.ts.html
  • coverage/lib/index.html
  • coverage/lib/utils.ts.html
  • coverage/prettify.css
  • coverage/prettify.js
  • coverage/sorter.js
  • coverage/stores/downloadStore.ts.html
  • coverage/stores/index.html
  • coverage/stores/layout-store.ts.html
  • coverage/stores/settingsStore.ts.html
  • coverage/stores/uiStore.ts.html
  • coverage/theme/index.html
  • coverage/theme/theme-provider.tsx.html
  • coverage/theme/useTheme.ts.html
  • coverage/types/index.html
  • coverage/types/layout.ts.html
  • coverage/views/DownloadsView/ActionsBar.tsx.html
  • coverage/views/DownloadsView/DownloadsTable.tsx.html
  • coverage/views/DownloadsView/DownloadsView.tsx.html
  • coverage/views/DownloadsView/EtaCell.tsx.html
  • coverage/views/DownloadsView/FilterBar.tsx.html
  • coverage/views/DownloadsView/ProgressCell.tsx.html
  • coverage/views/DownloadsView/SearchBar.tsx.html
  • coverage/views/DownloadsView/SpeedCell.tsx.html
  • coverage/views/DownloadsView/StateIndicator.tsx.html
  • coverage/views/DownloadsView/index.html
  • src-tauri/src/application/commands/update_config.rs
  • src/routes/__tests__/routes.test.tsx
  • src/views/SettingsView/DownloadsSection.tsx
  • src/views/SettingsView/__tests__/Sections.test.tsx

Comment thread .claude/settings.json Outdated
Comment thread AGENT.md Outdated
@@ -0,0 +1 @@
CLAUDE.md No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Replace the placeholder with real guidance (or remove the file).

AGENT.md currently contains only CLAUDE.md, which is non-actionable and looks like an accidental placeholder. Either add actual agent instructions or convert this into a clear markdown link + explanation.

Proposed fix
-CLAUDE.md
+# Agent guidance
+
+See [CLAUDE.md](./CLAUDE.md) for the full configuration and usage notes.

Based on learnings: "Use meaningful commit messages and document code changes clearly".

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
CLAUDE.md
# Agent guidance
See [CLAUDE.md](./CLAUDE.md) for the full configuration and usage notes.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENT.md` at line 1, AGENT.md currently contains only the placeholder text
"CLAUDE.md" — replace it with actionable agent documentation or remove it;
update AGENT.md to either (a) provide real instructions for using or running the
agent (purpose, setup steps, configuration keys, example commands, and expected
behavior) or (b) convert the placeholder into a clear markdown link and short
explanation (e.g., "See CLAUDE.md for X, or follow these steps..."); ensure the
file includes a meaningful header/title and a concise commit message describing
the change when committing (use AGENT.md and the referenced "CLAUDE.md" string
to locate the placeholder).

Comment thread coverage/clover.xml Outdated
Comment thread coverage/hooks/index.html Outdated
Comment thread coverage/layouts/index.html Outdated
Comment thread coverage/prettify.css Outdated
Comment thread coverage/theme/index.html Outdated
Comment thread coverage/views/DownloadsView/DownloadsView.tsx.html Outdated
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 61 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/routes/__tests__/routes.test.tsx">

<violation number="1" location="src/routes/__tests__/routes.test.tsx:7">
P2: Routing tests duplicate the route table instead of exercising the production router, so they can miss regressions in App.tsx/AppLayout and the real route elements.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread src/routes/__tests__/routes.test.tsx
- Replace toBeDefined() with not.toBeNull() for null-safe assertion
- Remove accidentally committed coverage/, .claude/, .codex, AGENT.md
- Add coverage/ and Claude Code local files to .gitignore
- Rewrite routes test to derive AppRoutes from ROUTES config (no duplication)
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.

🧹 Nitpick comments (2)
src/routes/__tests__/routes.test.tsx (2)

9-25: These redirect tests don’t verify the production router.

AppRoutes (Line 9 onward) re-implements routing/redirect behavior, so the assertions on Line 56 and Line 61 can still pass if src/App.tsx drifts. Today src/App.tsx hard-codes redirects at Line 27 and Line 38, so this suite gives false confidence about actual app routing.

Also applies to: 56-64

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/routes/__tests__/routes.test.tsx` around lines 9 - 25, The test
re-implements routing in AppRoutes instead of exercising the real router in
src/App.tsx, so keep tests aligned with production behavior by rendering the
actual App (or the router exported from it) rather than recreating ROUTES
locally; replace the AppRoutes helper with a render of the real App component
(or import the router/Routes from src/App.tsx) and drive navigation via
MemoryRouter/initialEntries if needed so the assertions that currently pass
against the fake AppRoutes will validate the real redirects implemented in
src/App.tsx.

28-30: Avoid hard-coding route count unless it is a strict product invariant.

The exact 10 assertion on Line 28 will create churn for legitimate route additions/removals. Prefer asserting required paths/features instead of a fixed total.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/routes/__tests__/routes.test.tsx` around lines 28 - 30, The test
currently hard-codes ROUTES length to 10 which will break on valid route
changes; modify the test that references ROUTES (the "should define exactly 10
routes" case) to instead assert required route entries exist—e.g., verify ROUTES
contains specific route objects or paths (use ROUTES array checks like
arrayContaining on the route path strings or route names) and/or validate
required features (protected flag, component existence) for those required
routes rather than asserting an exact total count.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/routes/__tests__/routes.test.tsx`:
- Around line 9-25: The test re-implements routing in AppRoutes instead of
exercising the real router in src/App.tsx, so keep tests aligned with production
behavior by rendering the actual App (or the router exported from it) rather
than recreating ROUTES locally; replace the AppRoutes helper with a render of
the real App component (or import the router/Routes from src/App.tsx) and drive
navigation via MemoryRouter/initialEntries if needed so the assertions that
currently pass against the fake AppRoutes will validate the real redirects
implemented in src/App.tsx.
- Around line 28-30: The test currently hard-codes ROUTES length to 10 which
will break on valid route changes; modify the test that references ROUTES (the
"should define exactly 10 routes" case) to instead assert required route entries
exist—e.g., verify ROUTES contains specific route objects or paths (use ROUTES
array checks like arrayContaining on the route path strings or route names)
and/or validate required features (protected flag, component existence) for
those required routes rather than asserting an exact total count.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 05e5f751-99d2-45f2-98e2-6ab3d3c83ee7

📥 Commits

Reviewing files that changed from the base of the PR and between 4ba1421 and e8b2728.

📒 Files selected for processing (3)
  • .gitignore
  • src/routes/__tests__/routes.test.tsx
  • src/views/SettingsView/__tests__/Sections.test.tsx
✅ Files skipped from review due to trivial changes (2)
  • .gitignore
  • src/views/SettingsView/tests/Sections.test.tsx

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 59 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/routes/__tests__/routes.test.tsx">

<violation number="1" location="src/routes/__tests__/routes.test.tsx:18">
P2: App routing coverage is now self-referential and no longer verifies the real router/component mapping or the canonical default redirect.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread src/routes/__tests__/routes.test.tsx
@mpiton mpiton merged commit 9d1b036 into main Apr 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation frontend rust

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: maxConcurrentDownloads validation allows up to 100, PRD specifies max 20

1 participant