Skip to content

refactor(src): drop comments the code can say, part 4 of 9 - #4071

Merged
devswha merged 3 commits into
mainfrom
refactor/no-comment-src-4
Nov 17, 2026
Merged

devswha merged 3 commits into
mainfrom
refactor/no-comment-src-4

Conversation

@devswha

@devswha devswha commented Nov 17, 2026

Copy link
Copy Markdown
Owner

What

Part 4 of 9 for src/ in the repo-wide comment pass. This part covers:

  • src/lib from compose to fontFamily: connection routes and traces, covered panes, custom themes, deep links, drafts, droplets, edge swipes, event streams, file lookups and previews, first hints, focus following, font faces
  • src/lib from mermaid to pasteFolders: the message queue, model names, more menus, native app calls, notifications, OSC 52, outcome chips, page queries, pairing, palette search, and the pane lifetime, moves, mutes, presentation and tab caches
  • the tests of all of these

About 1,500 comment lines go. Security, trap, platform and measured notes stay (the owner's rule for comment-removal PRs). What stays:

  • Behaviour we cannot change:
    • herdr's Claude manifest priorities (checked in herdr's claude.toml) and close rules (0.9.5)
    • Mermaid's strict security level, Capacitor 8 on iOS
    • Android Chrome and iOS notifications, Safari's clipboard gesture rule, iOS key repeat (When holding down backspace on mobile, the key does not repeat in terminal mode #862)
    • Unicode NFC (checked), Tailscale address ranges, RFC 1918, HTTP Range, the EventSource and WOFF2/cmap specs
    • @legendapp/list 3.3.5, the browser font-loading API, xterm's Alt+Enter encoding
  • Attribution: the T3 Code attributions in paletteFolders.ts, paletteSearch.ts and paletteSettings.ts stay word for word, and THIRD_PARTY_NOTICES.md (the MIT notice) is untouched.

Every change was checked against origin/main by syntax tree. No test, script or doc reads a deleted comment, and no code changes.

This PR touches queued input and drafts (compose.ts, draft.ts, messageQueue.ts) and pairing links (pageQuery.ts), with comments and no code changed there, so it waits for a real review (AGENTS.md).

Left open (redesigns, not done here)

  • Server codes instead of sentences:
    • compose.ts: one refusal code means several things, told apart by message strings.
    • fileNameLookup.ts: reads two statuses for two meanings.
    • fileFailure.ts: reads a status out of a TypeError message.
    • The server could send distinct codes for all of these.
  • Hand-kept copies:
    • droplet.ts LONG_TURN_MS copies server/push.ts.
    • edgeSwipe.ts's breakpoint and COMPOSER_STATUS_COMPACT_BELOW are kept in step with CSS by hand.
  • followFocus.ts: races frames against answers with a counter and timeout.
  • paneLifetime.ts: PaneLifetimes holds seven private maps, and a function is injected to dodge a circular import.
  • Dead code: narrowPaneFontSize returns its input unchanged. Its caller is the terminal view, so removing it waits for a browser-regression run.
  • Smaller items:
    • markdown.test.ts's console.error filter does nothing on React 19.3.0 (checked).
    • messageQueue.ts still reads the old plain-text format.

Validation

  • bun run check fast: passed (18,593 unit tests, typecheck, build, generated themes and types).
  • Unit tests of every touched test file and of the modules that import a touched one: 70 + 61 files, i18n.test.ts and src/conventions.test.ts included. All pass.
  • Not run: browser regressions (comments only).

🤖 Generated with Claude Code

devswha and others added 3 commits November 18, 2026 04:39
The fourth src/ slice of the repo-wide comment pass: src/lib from
compose to fontFamily (connection routes and traces, covered panes,
custom themes, deep links, drafts, droplets, edge swipes, event streams,
file lookups and previews, first hints, focus following, font faces)
and from mermaid to pasteFolders (the message queue, model names, more
menus, native app calls, notifications, OSC 52, outcome chips, page
queries, pairing, pane lifetime, moves, mutes, presentation and tab
caches, palette search), with their tests. About 2,400 comment lines
go; notes on herdr's Claude manifest, Mermaid, Capacitor, Android and
iOS notifications, Safari's clipboard, Unicode NFC, Tailscale ranges,
RFC 1918, HTTP Range, the EventSource spec, WOFF2 and @legendapp/list
stay. The t3code adaptation keeps its licence line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Documentation
    • Revised or removed inline explanations across the app, with no reported changes to runtime behavior.
  • Tests
    • Updated test coverage for settings links, file paths, notifications, task-result formatting, and cache behavior. Test-only changes do not indicate corresponding changes to app behavior.

The pull request revises comments across many library modules and tests. It also changes a few draft-handling cases, adds an optional native-platform bridge method, and updates assertions in several test files.

Changes: Library updates

Layer / File(s) Summary
Comment revisions and test updates
src/lib/*
Comments were shortened or removed across library code and tests. Several test files add or adjust assertions, including checks for draft input, Markdown parsing, file paths, pane state, and notification muting.
Draft handling and native bridge
src/lib/draft.ts, src/lib/draft.test.ts, src/lib/nativeApp.ts
applyToDraft now handles typed tabs through normal printable-text handling and returns EMPTY_DRAFT when Backspace erases the draft to empty. Draft restoration no longer uses the older omitted-text-count field. CapacitorBridge adds optional isNativePlatform.

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

Change: Other

Merge Risk: Minimal · up to 1facb

This change removes comments and does not alter runtime behavior, so it is safe to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "refactor(src): drop comments the code can say, part 4 of 9" matches the changeset, which removes explanatory comments across src/lib modules and their tests with no code changes. It is spec…
Description check Passed The description follows the template's Change and Validation sections. The Change section explains the scope, what was kept, and what was left open. The Validation section lists the checks run, the te…
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 "refactor(src): drop comments the code can say, part 4 of 9" matches the changeset, which removes explanatory comments across src/lib modules and their tests with no code changes. It is specific about the change type and scope, though it does not name the affected areas and the "part 4 of 9" suffix is series metadata.

Full details: Description check

Explanation

The description follows the template's Change and Validation sections. The Change section explains the scope, what was kept, and what was left open. The Validation section lists the checks run, the test counts, and the skipped browser regressions. The template's HTML comment about CONTRIBUTING.md, checks, and the changelog is not addressed. The description does not mention a changelog.d entry, and it does not state whether one is required for a comment-only change. It also does not link a tracking issue, which the template asks for on features only.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • 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

Commits

Reviewing files that changed from the base of the PR and between 30ba8bf and 1facbeb.

Files selected for processing: 121

  • src/lib/compose.ts
  • src/lib/connectionRoute.ts
  • src/lib/connectionTrace.test.ts
  • src/lib/connectionTrace.ts
  • src/lib/conversationFetch.test.ts
  • src/lib/conversationRefresh.ts
  • src/lib/coveredPane.hook.test.ts
  • src/lib/coveredPane.ts
  • src/lib/crashProbe.ts
  • src/lib/customThemes.test.ts
  • src/lib/customThemes.ts
  • src/lib/dagPane.test.ts
  • src/lib/dagPane.ts
  • src/lib/deepLink.test.ts
  • src/lib/deepLink.ts
  • src/lib/deleteRepeat.ts
  • src/lib/desktopLink.ts
  • src/lib/desktopUpdate.test.ts
  • src/lib/desktopUpdate.ts
  • src/lib/diff.ts
  • src/lib/diffLineNotes.test.ts
  • src/lib/diffLineNotes.ts
  • src/lib/directNotice.test.ts
  • src/lib/directNotice.ts
  • src/lib/draft.test.ts
  • src/lib/draft.ts
  • src/lib/droplet.test.ts
  • src/lib/droplet.ts
  • src/lib/edgeSwipe.test.ts
  • src/lib/edgeSwipe.ts
  • src/lib/eventStream.test.ts
  • src/lib/eventStream.ts
  • src/lib/fileFailure.test.ts
  • src/lib/fileFailure.ts
  • src/lib/fileIcons.ts
  • src/lib/fileNameLookup.test.ts
  • src/lib/fileNameLookup.ts
  • src/lib/filePanelWidth.ts
  • src/lib/filePaths.test.ts
  • src/lib/filePaths.ts
  • src/lib/filePresentation.ts
  • src/lib/filePreviewText.test.ts
  • src/lib/filePreviewText.ts
  • src/lib/fileReader.test.ts
  • src/lib/fileReader.ts
  • src/lib/firstHints.test.ts
  • src/lib/firstHints.ts
  • src/lib/focus.ts
  • src/lib/followFocus.test.ts
  • src/lib/followFocus.ts
  • src/lib/followScroll.ts
  • src/lib/fontFaces.test.ts
  • src/lib/fontFaces.ts
  • src/lib/fontFamily.test.ts
  • src/lib/markdown.test.ts
  • src/lib/mentions.test.ts
  • src/lib/mentions.ts
  • src/lib/mermaid.ts
  • src/lib/messageQueue.ts
  • src/lib/modelName.test.ts
  • src/lib/modelName.ts
  • src/lib/moreMenu.hook.test.ts
  • src/lib/moreMenu.test.ts
  • src/lib/moreMenu.ts
  • src/lib/namedAgentGroups.ts
  • src/lib/narrowPaneFont.test.ts
  • src/lib/narrowPaneFont.ts
  • src/lib/nativeApp.ts
  • src/lib/newSession.test.ts
  • src/lib/newSession.ts
  • src/lib/notificationTarget.test.ts
  • src/lib/notificationTarget.ts
  • src/lib/notifications.test.ts
  • src/lib/notifications.ts
  • src/lib/offThread.test.ts
  • src/lib/offThread.ts
  • src/lib/omoTasks.test.ts
  • src/lib/omoTasks.ts
  • src/lib/osc52.test.ts
  • src/lib/osc52.ts
  • src/lib/osc52Clipboard.ts
  • src/lib/outcomeChip.test.ts
  • src/lib/outcomeChip.ts
  • src/lib/pageQuery.ts
  • src/lib/pageScroll.ts
  • src/lib/pairedNotices.ts
  • src/lib/pairing.ts
  • src/lib/paletteFolders.ts
  • src/lib/paletteSearch.test.ts
  • src/lib/paletteSearch.ts
  • src/lib/paletteSeed.ts
  • src/lib/paletteSettings.test.ts
  • src/lib/paletteSettings.ts
  • src/lib/paneAfterClose.test.ts
  • src/lib/paneAfterClose.ts
  • src/lib/paneBranch.ts
  • src/lib/paneCanvas.ts
  • src/lib/paneCommandCache.test.ts
  • src/lib/paneCommandCache.ts
  • src/lib/paneDrag.ts
  • src/lib/paneLens.test.ts
  • src/lib/paneLens.ts
  • src/lib/paneLifetime.test.ts
  • src/lib/paneLifetime.ts
  • src/lib/paneLocks.test.ts
  • src/lib/paneLocks.ts
  • src/lib/paneMove.test.ts
  • src/lib/paneMove.ts
  • src/lib/paneMutes.ts
  • src/lib/paneName.test.ts
  • src/lib/paneName.ts
  • src/lib/paneObserving.test.ts
  • src/lib/paneObserving.ts
  • src/lib/panePresentation.test.ts
  • src/lib/panePresentation.ts
  • src/lib/paneRegion.ts
  • src/lib/paneSubmitContext.ts
  • src/lib/paneSubmitRetention.ts
  • src/lib/paneTabCache.ts
  • src/lib/paneTerminalShared.ts
  • src/lib/pendingMessages.test.ts
Files with no reviewable changes: 81

  • src/lib/connectionRoute.ts
  • src/lib/connectionTrace.test.ts
  • src/lib/conversationRefresh.ts
  • src/lib/coveredPane.hook.test.ts
  • src/lib/customThemes.test.ts
  • src/lib/dagPane.test.ts
  • src/lib/dagPane.ts
  • src/lib/deepLink.test.ts
  • src/lib/desktopLink.ts
  • src/lib/desktopUpdate.test.ts
  • src/lib/diff.ts
  • src/lib/diffLineNotes.test.ts
  • src/lib/diffLineNotes.ts
  • src/lib/directNotice.test.ts
  • src/lib/draft.test.ts
  • src/lib/draft.ts
  • src/lib/droplet.test.ts
  • src/lib/edgeSwipe.test.ts
  • src/lib/eventStream.test.ts
  • src/lib/eventStream.ts
  • src/lib/fileFailure.test.ts
  • src/lib/fileFailure.ts
  • src/lib/fileIcons.ts
  • src/lib/fileNameLookup.test.ts
  • src/lib/filePanelWidth.ts
  • src/lib/filePaths.test.ts
  • src/lib/filePresentation.ts
  • src/lib/filePreviewText.test.ts
  • src/lib/fileReader.test.ts
  • src/lib/firstHints.test.ts
  • src/lib/firstHints.ts
  • src/lib/followFocus.test.ts
  • src/lib/followScroll.ts
  • src/lib/fontFaces.test.ts
  • src/lib/fontFamily.test.ts
  • src/lib/markdown.test.ts
  • src/lib/mentions.test.ts
  • src/lib/mermaid.ts
  • src/lib/modelName.test.ts
  • src/lib/modelName.ts
  • src/lib/moreMenu.hook.test.ts
  • src/lib/moreMenu.test.ts
  • src/lib/moreMenu.ts
  • src/lib/narrowPaneFont.ts
  • src/lib/nativeApp.ts
  • src/lib/newSession.test.ts
  • src/lib/newSession.ts
  • src/lib/notificationTarget.test.ts
  • src/lib/notifications.test.ts
  • src/lib/offThread.test.ts
  • src/lib/omoTasks.test.ts
  • src/lib/osc52.test.ts
  • src/lib/osc52Clipboard.ts
  • src/lib/outcomeChip.test.ts
  • src/lib/pageScroll.ts
  • src/lib/pairedNotices.ts
  • src/lib/pairing.ts
  • src/lib/paletteSearch.test.ts
  • src/lib/paletteSeed.ts
  • src/lib/paletteSettings.test.ts
  • src/lib/paneAfterClose.test.ts
  • src/lib/paneAfterClose.ts
  • src/lib/paneCanvas.ts
  • src/lib/paneCommandCache.test.ts
  • src/lib/paneCommandCache.ts
  • src/lib/paneLens.test.ts
  • src/lib/paneLifetime.test.ts
  • src/lib/paneLocks.test.ts
  • src/lib/paneMove.test.ts
  • src/lib/paneMutes.ts
  • src/lib/paneName.test.ts
  • src/lib/paneName.ts
  • src/lib/paneObserving.test.ts
  • src/lib/paneObserving.ts
  • src/lib/panePresentation.test.ts
  • src/lib/paneRegion.ts
  • src/lib/paneSubmitContext.ts
  • src/lib/paneSubmitRetention.ts
  • src/lib/paneTabCache.ts
  • src/lib/paneTerminalShared.ts
  • src/lib/pendingMessages.test.ts

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

@devswha
devswha merged commit 8bd12c3 into main Nov 17, 2026
17 checks passed
@devswha
devswha deleted the refactor/no-comment-src-4 branch November 17, 2026 20:04
maslianok added a commit to maslianok/ovis that referenced this pull request Nov 17, 2026
…hs-at-the

main's comment pass (devswha#4071, devswha#4072, devswha#4074, devswha#4076, devswha#4051) and devswha#4029 touched the same lines as this branch.
In each conflict the branch's code stays, and a comment main removed that the branch had left
unchanged goes with it.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
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