Skip to content

fix(ui): sync cron workflow list filters to URL query params#16386

Open
amarkdotdev wants to merge 1 commit into
argoproj:mainfrom
amarkdotdev:fix/cron-workflow-list-url-filters
Open

fix(ui): sync cron workflow list filters to URL query params#16386
amarkdotdev wants to merge 1 commit into
argoproj:mainfrom
amarkdotdev:fix/cron-workflow-list-url-filters

Conversation

@amarkdotdev

@amarkdotdev amarkdotdev commented Jul 6, 2026

Copy link
Copy Markdown

Summary

  • Persist CronWorkflow list label and state filters in URL query parameters.
  • Restore filters from the URL on page load so list views can be shared and survive refresh.

Fixes #13168

Test plan

  • Open CronWorkflow list, set label/state filters, copy URL, open in new tab — filters restored
  • Confirm namespace and side panel URL behavior unchanged

Summary by CodeRabbit

  • Bug Fixes
    • Cron workflow filter selections (labels and states) are now synchronized with URL query parameters, preserving choices across navigation and refreshes.
    • Multiple selected label and state filters are correctly encoded into the generated page link.
    • When no state filter is provided, default states are applied automatically.
    • The “save history” navigation now also retains the current side panel setting when applicable.

@amarkdotdev amarkdotdev requested a review from a team as a code owner July 6, 2026 19:00
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 092b2fe4-3926-457b-979f-9fd1a664cf0f

📥 Commits

Reviewing files that changed from the base of the PR and between 66f2d84 and 27af34d.

📒 Files selected for processing (1)
  • ui/src/cron-workflows/cron-workflow-list.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • ui/src/cron-workflows/cron-workflow-list.tsx

📝 Walkthrough

Walkthrough

Cron workflow list now initializes label and state filters from URL query parameters and rewrites the history query string from the current filter state, including repeated label/state params and an optional sidePanel flag.

Changes

URL-synced filter state

Layer / File(s) Summary
Initialize filters and sync history
ui/src/cron-workflows/cron-workflow-list.tsx
Labels and states now load from label and state query params with fallback defaults, and the history update logic now emits repeated filter params plus conditional sidePanel=true while reacting to filter changes.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

  • #15794 — Also syncs list-page filter state into URL query parameters for shareable links.
  • #13168 — Directly matches the goal of sharing URLs with search criteria set.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the core summary and test plan, but it omits required Motivation, Modifications, Verification, Documentation, and AI sections. Add the missing template sections, including motivation, modifications, verification details, documentation notes, and an AI disclosure.
Linked Issues check ⚠️ Warning The PR only covers CronWorkflow label/state filters, but issue #13168 also requires shareable URL search criteria support for WorkflowTemplate lists. Extend the URL query-parameter support to WorkflowTemplate search criteria as required by #13168, and ensure all relevant list filters are restored from the URL.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: syncing CronWorkflow filters with URL query params.
Out of Scope Changes check ✅ Passed All changes are confined to syncing CronWorkflow list filters with the URL, with no unrelated edits apparent.
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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@ui/src/cron-workflows/cron-workflow-list.tsx`:
- Around line 64-77: The cron workflow list builds multi-value filter params
with repeated label/state keys, but the shared URL merge logic is collapsing
them to a single value. Update the `historyUrl` handling in
`ui/src/shared/history.ts` so `extraSearchParams` preserves repeated keys by
using append semantics instead of set semantics, keeping multi-select filters
intact for callers like `cron-workflow-list.tsx`.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 685b0d61-1fa0-4f43-ab6a-75882b8482e3

📥 Commits

Reviewing files that changed from the base of the PR and between 37d0dd7 and 66f2d84.

📒 Files selected for processing (1)
  • ui/src/cron-workflows/cron-workflow-list.tsx

Comment thread ui/src/cron-workflows/cron-workflow-list.tsx
Persist label and state filters in the URL so CronWorkflow list views can
be shared and restored on refresh, matching workflow-template-list behavior.

Fixes argoproj#13168


Signed-off-by: amarkdotdev <amarkdotdev@users.noreply.github.com>
@amarkdotdev amarkdotdev force-pushed the fix/cron-workflow-list-url-filters branch from 66f2d84 to 27af34d Compare July 6, 2026 20:25
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.

UI: Share URLs with search criteria set

1 participant