Skip to content

[WIKI-840] chore: accept spaces while searching for mentions#8258

Merged
pushya22 merged 1 commit intopreviewfrom
chore/mentions-search
Dec 8, 2025
Merged

[WIKI-840] chore: accept spaces while searching for mentions#8258
pushya22 merged 1 commit intopreviewfrom
chore/mentions-search

Conversation

@aaryan610
Copy link
Member

@aaryan610 aaryan610 commented Dec 8, 2025

Description

This PR adds the ability to add white spaces while searching for mentions in editor.

Type of Change

  • Improvement (change that would cause existing functionality to not work as expected)

Summary by CodeRabbit

  • New Features
    • Mention search now supports spaces in queries, enabling more flexible searching when looking up mentions.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Walkthrough

Adds a configuration flag allowSpaces: true to the suggestion render settings in the CustomMentionExtension, enabling space characters within mention search queries.

Changes

Cohort / File(s) Summary
Mention Configuration
packages/editor/src/core/extensions/mentions/extension.tsx
Added allowSpaces: true to suggestion render configuration

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Single configuration flag addition with no logic changes or side effects

Poem

🐰 A mention now breathes with space,
No more cramped into one place,
One flag set, the search runs free,
Hopping through words with glee! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description includes required sections (Description and Type of Change) but is missing Test Scenarios, Screenshots/Media, and References sections from the template.
Title check ✅ Passed The title clearly and specifically summarizes the main change: enabling spaces within mention search input, which aligns with the single file modification and PR objectives.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/mentions-search

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 and usage tips.

Copy link
Contributor

@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: 0

🧹 Nitpick comments (1)
packages/editor/src/core/extensions/mentions/extension.tsx (1)

29-34: Config change correctly enables spaces in mention search

Adding allowSpaces: true to the suggestion config cleanly meets the PR goal and fits the existing renderMentionsDropdown usage; no issues from a typing or runtime perspective are apparent. Just ensure your tests/QA cover multi‑word mentions and any edge cases like trailing spaces in the query.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ea74e1 and a8ed3cb.

📒 Files selected for processing (1)
  • packages/editor/src/core/extensions/mentions/extension.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,mts,cts}

📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)

**/*.{ts,tsx,mts,cts}: Use const type parameters for more precise literal inference in TypeScript 5.0+
Use the satisfies operator to validate types without widening them
Leverage inferred type predicates to reduce the need for explicit is return types in filter/check functions
Use NoInfer<T> utility to block inference for specific type arguments when they should be determined by other arguments
Utilize narrowing in switch(true) blocks for control flow analysis (TypeScript 5.3+)
Rely on narrowing from direct boolean comparisons for type guards
Trust preserved narrowing in closures when variables aren't modified after the check (TypeScript 5.4+)
Use constant indices to narrow object/array properties (TypeScript 5.5+)
Use standard ECMAScript decorators (Stage 3) instead of legacy experimentalDecorators
Use using declarations for explicit resource management with Disposable pattern instead of manual cleanup (TypeScript 5.2+)
Use with { type: "json" } for import attributes; avoid deprecated assert syntax (TypeScript 5.3/5.8+)
Use import type explicitly when importing types to ensure they are erased during compilation, respecting verbatimModuleSyntax flag
Use .ts, .mts, .cts extensions in import type statements (TypeScript 5.2+)
Use import type { Type } from "mod" with { "resolution-mode": "import" } for specific module resolution contexts (TypeScript 5.3+)
Use new iterator methods (map, filter, etc.) if targeting modern environments (TypeScript 5.6+)
Utilize new Set methods like union, intersection, etc., when available (TypeScript 5.5+)
Use Object.groupBy / Map.groupBy standard methods for grouping instead of external libraries (TypeScript 5.4+)
Use Promise.withResolvers() for creating promises with exposed resolve/reject functions (TypeScript 5.7+)
Use copying array methods (toSorted, toSpliced, with) for immutable array operations (TypeScript 5.2+)
Avoid accessing instance fields via super in classes (TypeScript 5....

Files:

  • packages/editor/src/core/extensions/mentions/extension.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Agent
  • GitHub Check: CodeQL analysis (javascript-typescript)
  • GitHub Check: Build and lint web apps
  • GitHub Check: Analyze (javascript)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the mention search functionality by enabling space characters in mention queries. This allows users to search for mentions containing spaces (e.g., "John Doe") rather than being restricted to continuous character strings.

Key changes:

  • Added allowSpaces: true configuration to the mention extension's suggestion settings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pushya22 pushya22 changed the title chore: accept spaces while searching for mentions [WIKI-840] chore: accept spaces while searching for mentions Dec 8, 2025
@makeplane
Copy link

makeplane bot commented Dec 8, 2025

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

@pushya22 pushya22 merged commit b359849 into preview Dec 8, 2025
13 checks passed
@pushya22 pushya22 deleted the chore/mentions-search branch December 8, 2025 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants