Skip to content

fix: expose completed_at filter in frontend issue views - #9538

Open
okxint wants to merge 1 commit into
makeplane:previewfrom
okxint:fix/completed-at-filter-frontend
Open

fix: expose completed_at filter in frontend issue views#9538
okxint wants to merge 1 commit into
makeplane:previewfrom
okxint:fix/completed-at-filter-frontend

Conversation

@okxint

@okxint okxint commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

The backend API (plane/utils/issue_filters.py) fully supports filtering issues by completed_at, but the frontend never exposed this filter — it was impossible to use through the UI.

Three gaps kept it invisible:

  1. IIssueFilterOptions in packages/types/src/view-props.d.ts had no completed_at field, so it could never enter filter state
  2. No FilterCompletedAt component existed
  3. None of the ISSUE_DISPLAY_FILTERS_BY_LAYOUT arrays included "completed_at", so isFilterEnabled("completed_at") always returned false

If a user managed to set the filter via direct API PATCH, subsequent UI edits would silently overwrite it.

Fixes #9508

Changes

  • packages/types/src/view-props.d.ts — add completed_at?: string[] | null to IIssueFilterOptions
  • filters/header/filters/completed-at.tsx — new FilterCompletedAt component (mirrors FilterTargetDate)
  • filters/header/filters/index.ts — export FilterCompletedAt
  • filters/header/filters/filters-selection.tsx — import and render FilterCompletedAt when filter is enabled
  • web/core/constants/issue.ts — add "completed_at" to filter arrays for issues.list, issues.kanban, issues.spreadsheet, issues.gantt_chart, and archived_issues.list

Calendar layout is intentionally excluded — completed date as a calendar axis doesn't make semantic sense.

Screenshots

No UI screenshots (component follows the identical structure and appearance as FilterTargetDate).

Summary by CodeRabbit

  • New Features
    • Added a Completed Date filter for issues.
    • Supports searchable preset date ranges, custom date selection, multi-select filtering, and applied-filter counts.
    • Available across issue lists, archived views, Kanban, spreadsheet, and Gantt views.

@coderabbitai

coderabbitai Bot commented Aug 4, 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 538ad192-fbe6-4d90-9f94-554698e7d06f

📥 Commits

Reviewing files that changed from the base of the PR and between 1942665 and 00077db.

📒 Files selected for processing (5)
  • packages/types/src/view-props.d.ts
  • web/core/components/issues/issue-layouts/filters/header/filters/completed-at.tsx
  • web/core/components/issues/issue-layouts/filters/header/filters/filters-selection.tsx
  • web/core/components/issues/issue-layouts/filters/header/filters/index.ts
  • web/core/constants/issue.ts

📝 Walkthrough

Walkthrough

The PR adds the optional completed_at filter type, enables it for issue views, and adds a UI component for predefined and custom completion-date filtering.

Changes

Completed-at issue filtering

Layer / File(s) Summary
Completed-at contract and view availability
packages/types/src/view-props.d.ts, web/core/constants/issue.ts
Adds completed_at to IIssueFilterOptions and supported issue view filter configurations.
Completed-at filter component
web/core/components/issues/issue-layouts/filters/header/filters/completed-at.tsx
Adds searchable date options, multi-select updates, custom date selection, applied-filter counts, preview state, and empty-result rendering.
Filter selection wiring and exports
web/core/components/issues/issue-layouts/filters/header/filters/index.ts, web/core/components/issues/issue-layouts/filters/header/filters/filters-selection.tsx
Exports FilterCompletedAt and renders it when the completed_at filter is enabled.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant FilterSelection
  participant FilterCompletedAt
  participant DateFilterModal
  User->>FilterSelection: Open completed_at filter
  FilterSelection->>FilterCompletedAt: Render filter
  User->>FilterCompletedAt: Select date option
  FilterCompletedAt->>FilterSelection: Update completed_at values
  User->>FilterCompletedAt: Select custom date
  FilterCompletedAt->>DateFilterModal: Open modal
  DateFilterModal->>FilterCompletedAt: Return selected date
  FilterCompletedAt->>FilterSelection: Update completed_at values
Loading

Possibly related issues

  • #9507: Covers exposing the missing completed_at filter through its type, component, registration, and view availability.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes exposing the completed_at filter in frontend issue views.
Description check ✅ Passed The description explains the problem, implementation, scope, issue reference, and screenshot status; missing test details are non-critical.
Linked Issues check ✅ Passed The changes satisfy issue #9508 by exposing and preserving completed_at across the required frontend view layouts.
Out of Scope Changes check ✅ Passed All changes directly support frontend exposure of the completed_at issue filter, with no unrelated modifications identified.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch fix/completed-at-filter-frontend
🧪 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.

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.

Bug: completed_at filter missing from Views filter dropdown in UI

1 participant