fix(KFLUXUI-1076): set correct url for list of issues#718
fix(KFLUXUI-1076): set correct url for list of issues#718JoaoPedroPP wants to merge 1 commit intokonflux-ci:mainfrom
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
Note
|
| Cohort / File(s) | Summary |
|---|---|
LatestIssuesCard component src/components/Issues/LatestIssuesCard.tsx |
Imported ISSUES_LIST_PATH and changed the "View all issues" link to use ISSUES_LIST_PATH.createPath({ workspaceName: namespace }) instead of the hard-coded /issues/list. |
Tests (namespace routing) src/components/Issues/__tests__/LatestIssuesCard.spec.tsx |
Updated assertions to expect the namespace-scoped path (/ns/test-namespace/issues/list) in three locations to match the component change. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~5-10 minutes
Possibly related PRs
- feat: add latest issues card component with hooks and tests #473: Introduced the component with the original hard-coded
/issues/listlink; directly related to replacing that link. - fix: add issue cards on dashboard and improve loading state #542: Refactored LatestIssuesCard (layout and footer changes) and touches the same view-all link and tests.
- chore(/KFLUXUI-830): Added tests for Issues Dashboard Page #500: Adds/tests the
ISSUES_LIST_PATH.createPathnamespace-scoped routing used here.
Suggested reviewers
- sahil143
- marcin-michal
- rakshett
Poem
A tiny link finds its place, namespace in tow,
From static road to pathways that grow.
Tests adjust their steady gaze,
Paths now sing in scoped arrays —
Small change, smooth flow. 🎉
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title clearly describes the main change: fixing the URL for the 'View all issues' link in LatestIssuesCard by using namespace-scoped routing instead of a hard-coded path. |
| 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 docstrings (stacked PR)
- 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
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 and usage tips.
Set correct URL for `View all issues` link in LatestIssuesCard component. Jira KFLUXUI-1076 Assisted-by: Cursor
c189941 to
0ceb19f
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
src/components/Issues/__tests__/LatestIssuesCard.spec.tsx (1)
388-388: Same path-hardcoding concern as above.
Please apply the route-helper refactor here as well.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/Issues/__tests__/LatestIssuesCard.spec.tsx` at line 388, Replace the hard-coded href assertion for viewAllLink with the route-helper used elsewhere: instead of asserting '/ns/test-namespace/issues/list', call the shared route builder (e.g., getIssuesListPath or buildIssuesListRoute) with the test namespace value and assert that the resulting string is the href; update the expect on viewAllLink to use that helper so paths stay consistent with other tests and routing changes.
🧹 Nitpick comments (1)
src/components/Issues/__tests__/LatestIssuesCard.spec.tsx (1)
149-149: Use the route helper in the test to avoid hard-coded paths.Align the assertion with production routing by using
ISSUES_LIST_PATH.createPath(...)so future path changes don’t require multiple test updates.♻️ Suggested change
+import { ISSUES_LIST_PATH } from '~/routes/paths';- expect(viewAllLink).toHaveAttribute('href', '/ns/test-namespace/issues/list'); + expect(viewAllLink).toHaveAttribute( + 'href', + ISSUES_LIST_PATH.createPath({ workspaceName: 'test-namespace' }), + );🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/Issues/__tests__/LatestIssuesCard.spec.tsx` at line 149, Replace the hard-coded href assertion with the route helper: import ISSUES_LIST_PATH and use expect(viewAllLink).toHaveAttribute('href', ISSUES_LIST_PATH.createPath({ namespace: 'test-namespace' })); this ensures the test uses the same route generation as production and avoids brittle string literals (update imports in LatestIssuesCard.spec.tsx to include ISSUES_LIST_PATH if missing).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@src/components/Issues/__tests__/LatestIssuesCard.spec.tsx`:
- Line 388: Replace the hard-coded href assertion for viewAllLink with the
route-helper used elsewhere: instead of asserting
'/ns/test-namespace/issues/list', call the shared route builder (e.g.,
getIssuesListPath or buildIssuesListRoute) with the test namespace value and
assert that the resulting string is the href; update the expect on viewAllLink
to use that helper so paths stay consistent with other tests and routing
changes.
---
Nitpick comments:
In `@src/components/Issues/__tests__/LatestIssuesCard.spec.tsx`:
- Line 149: Replace the hard-coded href assertion with the route helper: import
ISSUES_LIST_PATH and use expect(viewAllLink).toHaveAttribute('href',
ISSUES_LIST_PATH.createPath({ namespace: 'test-namespace' })); this ensures the
test uses the same route generation as production and avoids brittle string
literals (update imports in LatestIssuesCard.spec.tsx to include
ISSUES_LIST_PATH if missing).
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/components/Issues/LatestIssuesCard.tsxsrc/components/Issues/__tests__/LatestIssuesCard.spec.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/components/Issues/LatestIssuesCard.tsx
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #718 +/- ##
==========================================
- Coverage 87.23% 87.12% -0.12%
==========================================
Files 764 764
Lines 58225 58228 +3
Branches 5658 5658
==========================================
- Hits 50795 50731 -64
- Misses 7376 7419 +43
- Partials 54 78 +24
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 39 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Assisted-by: Cursor
Fixes
KFLUXUI-1076
Description
Set correct URL for
View all issueslink in LatestIssuesCard component.Type of change
Screen shots / Gifs for design review
Before

After

How to test or reproduce?
Issuesside menuView all issueslinkBrowser conformance:
Summary by CodeRabbit
Bug Fixes
Tests