Skip to content

fix(one-page): leave no highlight after a cut-off note name in the file picker - #2127

Merged
chhoumann merged 1 commit into
masterfrom
2124-one-page-file-picker-paints-a-stray-highlight-after-a-cut-off-note-name
Oct 1, 2026
Merged

chhoumann merged 1 commit into
masterfrom
2124-one-page-file-picker-paints-a-stray-highlight-after-a-cut-off-note-name

Conversation

@chhoumann

@chhoumann chhoumann commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

A one-page file field cuts a long note name with "…". When a highlighted match fell in the cut-off part, the ellipsis hid its text but not its highlight background, so a small lavender block showed after the "…". Matches in these rows are now bold with no background, as in the run's own Capture to picker, so a hidden match leaves nothing behind.

Before (master 6082143) After, light After, dark
Stray highlight blocks after the cut-off name Bold matches, nothing after the ellipsis Same in dark

Repro: folder Capture to People/ with one-page input, a note People/Alexandria Ocasio-Cortez Long Name Example.md; run it, click Search files..., type Zed.

The picker and its CSS date from #1643 and are unchanged since 2.29.0, but 2.30 puts this field in front of every one-page folder, tag and property Capture (#2099), where long names are common and the field is narrower on phones. The change is one CSS rule scoped to these rows; other .qa-highlight uses keep their background.

New native spec in tests/e2e/one-page-capture-target.test.ts: it types a query that matches only the cut-off end of a long name and checks the highlight paints no background. It fails on master's CSS with the highlight colour and passes here.

Checks: pnpm run build-with-lint, pnpm run test (6603 passed), .agents/run-e2e on a clean vault (398 passed, 24 Templater-only skipped). No release or migration impact.

Fixes #2124

Note

Fix stray highlight on cut-off note names in the one-page file picker

A scoped CSS rule makes the highlight background transparent when matched text is clipped by the ellipsis in one-page file suggestion labels. The highlight element and text styling stay unchanged. Adds an e2e test that searches for a match near the end of a long note name and verifies the clipped match shows no visible highlight (one-page-capture-target.test.ts).

Macroscope summarized b01d996.

Summary by CodeRabbit

  • Bug Fixes
    • Prevented highlighted search matches from leaving a visible background when suggestion text is truncated.

…le picker

A long note name in a one-page file field is cut with an ellipsis,
which hides a match's text but not its highlight background, so a
small block showed after the "…". Matches there are now bold only,
as in the run's own picker.

Fixes #2124
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T14:31:17.449240Z b01d996 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: ae97a488-ebbd-44c4-bb8b-ac3efba3dd21

📥 Commits

Reviewing files that changed from the base of the PR and between 6082143 and b01d996.

📒 Files selected for processing (2)
  • src/styles.css
  • tests/e2e/one-page-capture-target.test.ts

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


📝 Walkthrough

Walkthrough

The one-page file-picker suggestion text now uses a transparent background for match highlights. An end-to-end test checks that the highlight remains transparent when a matching note name is clipped by the label ellipsis.

Changes

File-picker match highlight

Layer / File(s) Summary
Transparent highlight and regression test
src/styles.css, tests/e2e/one-page-capture-target.test.ts
The CSS makes .qa-highlight backgrounds transparent in one-page file-picker suggestions. The end-to-end test searches for “zebra” with a long note name and checks that the clipped label’s highlight is transparent. The test cancels the modal afterward.

Priority: ⬇️ Low

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

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to b01d9

The change addresses the clipped-highlight behavior with a scoped style and a focused regression test. No material merge risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: preventing visible highlighting when a one-page file-picker note name is truncated.
Linked Issues check ✅ Passed Issue [#2124] requires no visible background for a match hidden by ellipsis in the one-page file picker. src/styles.css scopes background-color: transparent to `.qa-onepage-file-suggestion__text .…
Out of Scope Changes check ✅ Passed The reviewed changes are limited to the one-page file-picker highlight rule and an E2E regression test for issue [#2124]. The test supports the CSS change. No unrelated change is shown.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

A rabbit searched for “zebra” in the night,
A clipped name kept its highlight light.
No lavender block remained in view,
The picker showed the match as due.
Then closed the modal, and hopped from sight.

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

@chhoumann
chhoumann merged commit 22d82a6 into master Oct 1, 2026
15 checks passed
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.

One-page file picker paints a stray highlight after a cut-off note name

1 participant