Skip to content

feat: add title to rich work item filters - #9934

Open
anhhtbk wants to merge 8 commits into
makeplane:previewfrom
anhhtbk:feat/filter-by-title
Open

anhhtbk wants to merge 8 commits into
makeplane:previewfrom
anhhtbk:feat/filter-by-title

Conversation

@anhhtbk

@anhhtbk anhhtbk commented Oct 3, 2026 •

Copy link
Copy Markdown

Description

Adds a Title filter to the Work Items rich-filter menu, allowing users to filter work items by a case-insensitive substring of their title.

  • Supports the contains operator and matches only the title, not the description or work item ID.
  • Combines with existing filters using AND.
  • Applies changes on Enter or when the input loses focus; Escape discards uncommitted edits.
  • Trims surrounding whitespace. Submitting an empty value or removing the filter chip clears the Title condition while preserving other filters.
  • Preserves the Title condition through project filter persistence and Save view.
  • Uses the existing rich-filter API with name__icontains, without introducing a separate search endpoint or client-side matching implementation.
  • Includes regression tests and usage documentation.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

Added regression coverage for:

  • Case-insensitive substring matching against work item titles.
  • Excluding matches found only in descriptions, UUIDs, or work item identifiers.
  • Combining Title with Priority and State filters using AND.
  • Returning no results when the title does not match.
  • Treating punctuation and characters such as commas, &, %, and _ literally.
  • Committing trimmed values on Enter or blur without committing while typing.
  • Discarding draft edits on Escape, including when followed by blur.
  • Clearing the Title condition while preserving other active filters.
  • Saving and restoring filter expressions without losing the title value or other conditions.
  • Preventing edits and commits when the filter is disabled.

Regression commands are documented in the README:

pnpm turbo run build --filter=@plane/shared-state...
pnpm --filter @plane/shared-state test
pnpm --filter web test
docker compose -f docker-compose-test.yml run --rm api-tests \
  pytest plane/tests/unit/utils/test_issue_title_filters.py \
  plane/tests/unit/utils/test_issue_datetime_filters.py -q

References

#7108

Summary by CodeRabbit

  • New Features
    • Added a Title filter for work items that matches title text regardless of case; descriptions and issue IDs are not searched.
    • Combine Title with other filters, and retain it when saving a view or restoring project filters.
    • Press Enter or leave the field to apply your text. Extra spaces are trimmed; Escape cancels an uncommitted edit, and clearing the text removes the condition.
  • Documentation
    • Added guidance on Title filtering and project filter behavior, including regression-check commands.

@CLAassistant

CLAassistant commented Oct 3, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

Adds a work-item Title filter with text input, case-insensitive issue-name matching, and support for saved and restored filter expressions. Adds tests and documentation for input behavior, persistence, and API matching.

Changes: Work Item Title Filter

Layer / File(s) Summary
Text operator and Title filter contract
packages/types/src/rich-filters/*, packages/types/src/view-props.ts, packages/constants/src/rich-filters/operator-labels/core.ts, packages/constants/src/i18n/locales/*, packages/utils/src/rich-filters/factories/configs/shared.ts, packages/utils/src/work-item-filters/configs/filters/*, packages/constants/src/issue/filter.ts
Adds a text field type and icontains operator configuration. Defines the Title filter for the name property, adds name to the issue-page filter list, and adds translated operator labels.
Text input and filter registration
apps/web/components/rich-filters/filter-value-input/*, apps/web/hooks/work-item-filters/use-work-item-filters-config.tsx, apps/web/package.json, apps/web/vitest.config.ts
Adds text input draft and commit behavior and registers the Title filter. Adds component tests and Vitest configuration.
API title matching
apps/api/plane/utils/filters/filterset.py, apps/api/plane/tests/unit/utils/test_issue_title_filters.py
Adds case-insensitive issue-name containment filtering and tests title matching with other filters.
Filter expression persistence
packages/shared-state/src/store/work-item-filters/title-filter.test.ts, packages/shared-state/package.json, README.md
Tests saving, restoring, editing, and clearing the Title condition while preserving other filters. Documents filter behavior, regression-check commands, and the rich-filter request approach.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested labels: 🌐frontend

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant TextFilterValueInput
  participant ProjectWorkItemList
  participant ComplexFilterBackend
  participant IssueFilterSet
  User->>TextFilterValueInput: Commit title text
  TextFilterValueInput->>ProjectWorkItemList: Emit name icontains condition
  ProjectWorkItemList->>ComplexFilterBackend: Refetch with filter expression
  ComplexFilterBackend->>IssueFilterSet: Apply issue filters
  IssueFilterSet-->>ComplexFilterBackend: Return matching issue names
Loading
Merge Risk: Low · previous review 25b8a · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Security architecture risk: Low · up to 89467

The title condition narrows existing work-item results without demonstrating broader data access or new privileges. Risk is low, but authorization across every affected endpoint and recovery from failed or overlapping saves were not fully verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The new predicate is available to consumers of IssueFilterSet. In the inspected issue-list consumer, the underlying set is restricted to workspace, project, requested issue IDs, and guest-created issues where required before rich filtering. Workspace-view and archive consumers also retain independent permission restrictions. This bounds the checked paths, not every affected consumer.

Security Findings and Attack Paths

  • inferred — An attacker-controlled title string reaches an allowlisted, fixed ORM predicate. Because that predicate intersects the existing queryset, it does not provide a mechanism to add records outside the checked authorization scopes. No introduced query-injection or boundary-bypass concern was substantiated in these inspected paths; unresolved consumers remain a coverage limitation.

Trust Boundaries and Controls

  • observed — Filtering and authorization remain separate controls in the checked API paths. Unsupported filter fields are rejected, missing FilterSet configuration rejects filtering, and role or membership restrictions constrain the work-item queryset independently of the new text condition.

Resilience and Maintainability Implications

  • observed — Title inherits pre-existing persistence semantics: project filtering updates local state before awaiting persistence, and the inspected saved-view update callback does not return its network promise although the filter instance subsequently resets its baseline. Failed or overlapping saves can therefore leave local and durable state inconsistent. Base/head comparison found these routines unchanged; no new authorization exposure was demonstrated, so this is not retained as an active PR concern.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat: add title to rich work item filters" matches the main change. The PR adds a Title filter to the Work Items rich-filter menu. It uses case-insensitive substring matching through name__…
Description check Passed The description follows the repository template. It has a Description section that explains the Title filter, its matching rules, commit and cancel behavior, clearing behavior, persistence, and API us…
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.
Full details: Title check

Explanation

The title "feat: add title to rich work item filters" matches the main change. The PR adds a Title filter to the Work Items rich-filter menu. It uses case-insensitive substring matching through name__icontains. The diff includes the backend filter, the frontend text input, the operator, the i18n strings, and the tests that support this feature. The title is short, specific, and in one sentence. It does not list files or use vague terms.

Full details: Description check

Explanation

The description follows the repository template. It has a Description section that explains the Title filter, its matching rules, commit and cancel behavior, clearing behavior, persistence, and API use. The Type of Change section marks Feature and Documentation update. The Screenshots section is still a placeholder comment with no images. The Test Scenarios section lists coverage and the exact commands. It does not report whether those commands passed. The References section links issue #7108.

Resolution

Optional improvements: add screenshots of the Title filter menu and the filtered list in the Screenshots and Media section, or state that none apply. Also report the outcome of the test commands, because the Test Scenarios section lists the commands but does not say whether they passed.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 011ac828-cb8e-460f-ad5e-8a68240505b1
Commits

Reviewing files that changed from the base of the PR and between 9baa55d and 25b8ab7.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 27

  • README.md
  • apps/api/plane/utils/filters/filterset.py
  • apps/web/hooks/work-item-filters/use-work-item-filters-config.tsx
  • packages/constants/src/rich-filters/operator-labels/core.ts
  • packages/i18n/src/locales/bg/common.json
  • packages/i18n/src/locales/cs/common.json
  • packages/i18n/src/locales/de/common.json
  • packages/i18n/src/locales/en/common.json
  • packages/i18n/src/locales/es/common.json
  • packages/i18n/src/locales/fr/common.json
  • packages/i18n/src/locales/id/common.json
  • packages/i18n/src/locales/it/common.json
  • packages/i18n/src/locales/ja/common.json
  • packages/i18n/src/locales/ka-ge/common.json
  • packages/i18n/src/locales/ko/common.json
  • packages/i18n/src/locales/nl/common.json
  • packages/i18n/src/locales/pl/common.json
  • packages/i18n/src/locales/pt-BR/common.json
  • packages/i18n/src/locales/ro/common.json
  • packages/i18n/src/locales/ru/common.json
  • packages/i18n/src/locales/sk/common.json
  • packages/i18n/src/locales/tr-TR/common.json
  • packages/i18n/src/locales/ua/common.json
  • packages/i18n/src/locales/vi-VN/common.json
  • packages/i18n/src/locales/zh-CN/common.json
  • packages/i18n/src/locales/zh-TW/common.json
  • packages/utils/src/rich-filters/factories/configs/shared.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Rename three shadowing callback parameters to satisfy pre-commit lint without changing behavior.
@anhhtbk
anhhtbk force-pushed the feat/filter-by-title branch from b258381 to 8946703 Compare October 3, 2026 15:14
Upstream replaced the flat filter chip and COMMON_FILTER_ITEM_BORDER_CLASSNAME with joined pill segments; the title text input now relies on the pill group for its seams.

@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.

  • Fix comments: Fix CodeRabbit comments on this PR

anhhtbk and others added 3 commits December 1, 2026 16:27
…itle

Conflict: apps/web/hooks/work-item-filters/use-work-item-filters-config.tsx
(variable renames on both sides; took upstream naming, kept the title filter).

Follow-ups required by upstream's filter i18n:
- add rich_filters.operators.contains for the fork's ICONTAINS operator
  (CORE_OPERATOR_LABEL_I18N_KEYS_MAP is a full Record) in all locales
- pass a translated label (common.title) to the title filter config
- regenerate pnpm-lock.yaml from upstream's lockfile with pnpm install
- Skip empty name__icontains in BaseFilterSet.build_combined_q so an empty leaf cannot match every issue and swallow sibling OR conditions
- Add regression test for empty-only leaf and empty title inside an OR group

This branch has not been deployed

No deployments
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