Skip to content

Hide .md extension in settings suggesters#1104

Merged
chhoumann merged 3 commits intomasterfrom
codex/hide-md-extension-settings-suggesters
Feb 6, 2026
Merged

Hide .md extension in settings suggesters#1104
chhoumann merged 3 commits intomasterfrom
codex/hide-md-extension-settings-suggesters

Conversation

@chhoumann
Copy link
Owner

@chhoumann chhoumann commented Feb 6, 2026

Fixes #102

  • Settings UI file-path suggesters now hide a trailing .md in the suggestion list.
  • Selected/stored values are unchanged (full path including .md).
  • Only .md is stripped; other extensions remain visible.

Notes:

  • Runtime suggesters are unchanged.
  • Template-path suggestions produced inside {{TEMPLATE:...}} tokens still show .md.

Open with Devin

Summary by CodeRabbit

  • New Features

    • Markdown filenames are shown without trailing ".md" in suggestions; matching and highlights remain accurate and case-insensitive.
    • Display labels normalize partial ".md" queries so suggestions highlight the base name while leaving non-markdown names unchanged.
  • Tests

    • Added thorough tests covering extension stripping, case-insensitivity, partial matches, and edge cases.

Only affects suggestion display text; selected/stored values keep full paths.
@vercel
Copy link

vercel bot commented Feb 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
quickadd Ready Ready Preview Feb 6, 2026 10:17pm

@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

Adds a display-only helper to strip trailing .md from filenames and applies it in the generic text suggester so UI suggestions hide .md extensions while stored values remain unchanged.

Changes

Cohort / File(s) Summary
Markdown extension utility & tests
src/gui/suggesters/utils.ts, src/gui/suggesters/utils.test.ts
Added and exported stripMdExtensionForDisplay(value: string): string and tests covering case-insensitive .md stripping, non-terminal .md cases, and other extensions.
Suggester integration & tests
src/gui/suggesters/genericTextSuggester.ts, src/gui/suggesters/genericTextSuggester.test.ts
renderSuggestion now applies stripMdExtensionForDisplay to the display value and current query, adjusts displayQuery when value ends with .md and displayQuery starts with <displayValue>., and calls renderMatch with the adjusted display values; tests validate partial/case-insensitive .md normalization and unchanged behavior for non-.md files.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through lines both short and neat,
Snipped off .md so names look sweet,
Suggestions now bounce without the dot,
A tidy list — I praise the spot. 🥕

🚥 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 'Hide .md extension in settings suggesters' directly and clearly describes the main change: hiding the .md extension in settings UI suggesters.
Linked Issues check ✅ Passed The changes implement the requirement from issue #102 by stripping the .md extension from suggestion display in settings suggesters while preserving the full path in stored values.
Out of Scope Changes check ✅ Passed All changes are scoped to settings suggesters (.md extension stripping) and do not affect runtime suggesters or other unrelated functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 codex/hide-md-extension-settings-suggesters

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.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 6, 2026

Deploying quickadd with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1961250
Status: ✅  Deploy successful!
Preview URL: https://77c4ac27.quickadd.pages.dev
Branch Preview URL: https://codex-hide-md-extension-sett.quickadd.pages.dev

View logs

Copy link

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

🤖 Fix all issues with AI agents
In `@src/gui/suggesters/genericTextSuggester.ts`:
- Around line 40-45: In renderSuggestion, normalize the displayed query the same
way the displayed value is normalized so highlights still match when the user
types a partial extension (e.g. "note.m"); specifically, keep using
stripMdExtensionForDisplay(value) to produce displayValue, then if the raw value
ends with ".md" (case-insensitive) and the current query
(this.getCurrentQuery()) begins with displayValue followed by a dot (i.e.
displayQuery.startsWith(displayValue + '.')), replace displayQuery with
displayValue before calling renderMatch; reference renderSuggestion,
stripMdExtensionForDisplay, getCurrentQuery, and renderMatch when making this
change.

When the selected value ends with .md but the query includes a partial extension (e.g. note.m), normalize the display query to keep highlights aligned.
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

Ensures highlight normalization still triggers when user types note.m but suggestion casing differs (e.g. Note.MD).
@chhoumann chhoumann merged commit 2e6056e into master Feb 6, 2026
5 checks passed
@chhoumann chhoumann deleted the codex/hide-md-extension-settings-suggesters branch February 6, 2026 22:45
github-actions bot pushed a commit that referenced this pull request Feb 8, 2026
# [2.11.0](2.10.0...2.11.0) (2026-02-08)

### Bug Fixes

* add newline when appending tasks ([#1102](#1102)) ([a4b4e4a](a4b4e4a))
* clarify split direction labels to match actual behavior ([#1089](#1089)) ([ea97045](ea97045)), closes [#1081](#1081)
* correct end-of-section line detection ([#1096](#1096)) ([0eeedb3](0eeedb3)), closes [#593](#593)
* **docs:** explain how to add user scripts to macros ([c6e2448](c6e2448))
* encode spaces in advanced uri docs ([0c24cd0](0c24cd0))
* handle alias frontmatter case and commas ([cc6aec6](cc6aec6))
* improve capture target resolution ([1bd7520](1bd7520))
* improve choice rename UX ([bccc331](bccc331)), closes [#683](#683)
* **settings:** hide .md extension in settings suggesters ([#1104](#1104)) ([2e6056e](2e6056e)), closes [#102](#102)

### Features

* **format:** add case transforms for VALUE/NAME ([#1103](#1103)) ([1a962c2](1a962c2)), closes [#90](#90)
@github-actions
Copy link

github-actions bot commented Feb 8, 2026

🎉 This PR is included in version 2.11.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Showing ".md" extension for files in list boxes

1 participant