Skip to content

chore: remove useless search and Markdown expressions - #2437

Merged
jatmn merged 1 commit into
Twigpine:mainfrom
jatmn:fix/useless-expression-search-markdown-5jimqPRr
Oct 27, 2026
Merged

jatmn merged 1 commit into
Twigpine:mainfrom
jatmn:fix/useless-expression-search-markdown-5jimqPRr

Conversation

@jatmn

@jatmn jatmn commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Remove the discarded collected; and nonTableContent; reads. Search result counting, truncation, Markdown formatting and buffer flushing remain unchanged.

Resolves Code Quality js/useless-expression findings 1126 and 229 from the reported rule. This is one of four independent PRs covering the 17 currently returned findings; the original report mentioned 26, and the requester approved fixing the available inventory. Each branch starts directly from main a91f736ef1c257d00dd4ced04f86e21401289f40.

Impact

  • User-facing: existing behavior and rendered output are preserved.
  • Developer/maintainer: removes confirmed no-effect expressions without broad cleanup, dependencies, or configuration changes.

Testing

  • Followed CONTRIBUTING Validation; reviewed AGENTS.md and CONTRIBUTING.md.
  • Fresh locked installation: bun install --frozen-lockfile.
  • Passed on reviewed commit e504faf173257654c539f76d7f92c45fb5859a75 with Bun 1.4.4 / Node 26.12.1: bun run check:static, bun run typecheck:fast, bun run typecheck:type-tests, node bin/openclaude --version, NODE_DISABLE_COMPILE_CACHE=1 node bin/openclaude --version, and git diff --check.
  • Refreshed canonical upstream main and passed bun run security:pr-scan -- --base FETCH_HEAD --head HEAD on the committed changes.
  • bun run test src/utils/markdown.test.ts — 16 passed, including production Markdown and StreamingMarkdown rendering.
  • Optimized JavaScript is byte-identical for both changed modules. All hunks and their consumers reviewed; no new tests needed.
  • No previous gate results reused. Full unit/provider/web/extension suites were not selected locally: no shared runtime, provider, site, dependency or configuration behavior changes. Existing non-failing lint warnings and Knip hints remain.
  • CI: all applicable checks passed on the reviewed commit; untouched surfaces skipped as intended. CodeRabbit approved this revision with no actionable findings. Kept as a draft; no maintainer review requested.

Notes

  • Provider/model path: not applicable.
  • Screenshots: not applicable; presentation is unchanged.
  • Main-branch findings remain visible until merge and successful analysis. No findings were dismissed.

Summary by CodeRabbit

  • Chores
    • Minor internal cleanup was made in search and Markdown processing. Search behavior, match counts, and Markdown rendering remain unchanged. This update does not change the visible interface or add user-facing capabilities. No action is needed to continue using search or viewing Markdown content.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between a91f736 and e504faf.

Files selected for processing: 2
  • src/components/GlobalSearchDialog.tsx
  • src/components/Markdown.tsx
Files with no reviewable changes: 2
  • src/components/Markdown.tsx
  • src/components/GlobalSearchDialog.tsx

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

Recent review details
Context from checks skipped due to timeout: 3
  • GitHub Check: CodeRabbit
  • GitHub Check: unit-tests (5)
  • GitHub Check: CodeQL (javascript-typescript)
Walkthrough

The search results callback and the non-table Markdown token branch each no longer contain a standalone expression that did not affect the result.

Changes: Standalone expression cleanup

Layer / File(s) Summary
Remove no-op expressions
src/components/GlobalSearchDialog.tsx, src/components/Markdown.tsx
Removed standalone expressions that did not affect search match counting or Markdown content rendering.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Refactor

Merge Risk: Minimal · up to e504f

No merge-blocking issue is identified; the cleanup appears ready for normal checks.

Pre-merge checks: Passed 6
Check name Status Explanation
Title check Passed The title "chore: remove useless search and Markdown expressions" matches the diff, which removes two no-op expression statements (collected; in GlobalSearchDialog.tsx and nonTableContent; in Mark…
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.
Risk Surface Disclosed Passed PASS — The PR changes only two standalone no-op expressions in GlobalSearchDialog.tsx and Markdown.tsx. The diff does not change authentication, provider routing, permissions, outbound network beh…
No Hidden Policy Change Passed PASS — The PR changes only two files and deletes two standalone no-op expressions: collected; and nonTableContent;. No product, trust-model, routing-default, telemetry/network, or permission-polic…
Description check Passed The description follows the repository template. It explains the changes and rationale, documents user-facing and maintainer impact, lists validation commands and results, identifies skipped checks an…
Full details: Title check

Explanation

The title "chore: remove useless search and Markdown expressions" matches the diff, which removes two no-op expression statements (collected; in GlobalSearchDialog.tsx and nonTableContent; in Markdown.tsx). It is concise and scoped. It names the search and Markdown areas but does not name the specific rule or the file-level detail, which is acceptable for this change.

Full details: Risk Surface Disclosed

Explanation

PASS — The PR changes only two standalone no-op expressions in GlobalSearchDialog.tsx and Markdown.tsx. The diff does not change authentication, provider routing, permissions, outbound network behavior, background execution, startup/config-home behavior, skills/plugins/MCP, CI permissions, or release scripts. The PR description states that search and Markdown behavior remain unchanged, so no blocker risk surface required disclosure.

Full details: No Hidden Policy Change

Explanation

PASS — The PR changes only two files and deletes two standalone no-op expressions: collected; and nonTableContent;. No product, trust-model, routing-default, telemetry/network, or permission-policy behavior changes are present in the reviewed diff.

Full details: Description check

Explanation

The description follows the repository template. It explains the changes and rationale, documents user-facing and maintainer impact, lists validation commands and results, identifies skipped checks and reasons, and includes CI, CodeRabbit, and notes status.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@jatmn jatmn self-assigned this Oct 27, 2026
@jatmn
jatmn marked this pull request as ready for review October 27, 2026 13:15
@jatmn
jatmn merged commit 3202a15 into Twigpine:main Oct 27, 2026
28 checks passed
@jatmn
jatmn deleted the fix/useless-expression-search-markdown-5jimqPRr branch October 27, 2026 13:16
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.

1 participant