Repository navigation
refactor(src): drop comments the code can say, part 8 of 9 - #4077
Conversation
The eighth src/ slice of the repo-wide comment pass: the components from ConnectPhoneDialog to InboxMode (the phone QR dialog, conversation search, devices, directory browser, droplets, files dialog and viewer, first-start hints, find bar, image lightbox and inbox list), from SessionHistory to SignOutRow (settings controls and dialog, the setup guide and the sidebar), and src/lib's pending messages, preferences sync, prompt answers, push and push health, recent directories and the relay account controller, boot and channel, with their tests. About 3,700 comment lines go; security, trap, platform and measured notes stay (the owner's rule for comment-removal PRs), as do the fixed-wait markers and the attribution lines. One dead exhaustive-deps suppression goes (no ESLint runs). Comments only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rule 3) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
What
Part 8 of 9 for
src/in the repo-wide comment pass. This part covers:src/componentsfromConnectPhoneDialogtoInboxMode: the phone QR dialog, conversation search, devices, the directory browser, droplets, the files dialog and viewer, first-start hints, the find bar, highlighted code, the image lightbox and the inbox list, with their CSSsrc/componentsfromSessionHistorytoSignOutRow: settings controls and the settings dialog, the setup guide and the sidebar, with their CSSsrc/lib: pending messages, the phone and plugin runs, Portal, preferences sync, pressed buttons, prompt answers and text, push and push health, receipt resume, the reconnect grace, recent directories, and the relay account controller, boot, channel and dashboardAbout 3,200 comment lines go. Security notes, platform facts, measured values, third-party attributions, and traps that name a concrete breakage stay (the owner's rule for comment-removal PRs). What else stays:
// fixed wait:markers (DevicesPanel,relay/accountController.ts), "adapted from Agent of Empires (MIT)" inpushHealth.ts, and the pinned Unicode tables inpromptAnswer.ts(CaseFolding.txt, confusables.txt / UTS feat: gjc chat, gjc and omo marks #39).Every change was checked against
origin/mainby syntax tree (CSS with comments stripped). No test, script or doc reads a deleted comment, and no code changes. The oneeslint-disable-line react-hooks/exhaustive-depsinFirstStartHints.tsxstays, as lint directives do.This PR touches relay sign-in and pairing (
src/lib/relay/accountController.ts,boot.ts, thechannel.tstests), the devices panel, queued input (pendingMessages.ts) and the file viewer's sandbox, with comments and no code changed there, so it waits for a real review (AGENTS.md).Rules that only a comment stated (deleted, not enforced yet)
preferencesSync.ts): a made-up mute list is never sent to a server that keeps none.relay/accountController.ts): an earlier sign-in's read never holds back the next.InboxList: a query never narrows the list unseen; a failure is never taken for "Loading…" or an empty list.Sidebar: pins of workspaces gone from this PC leave only by a change the user makes.FirstStartHints: nothing takes the keyboard from the pane, and nothing is announced.recent-directories.ts: missing panes never delete history.receiptResume.ts: the storage shape must not change.SettingsControls: every theme's raised background and strong border stay opaque; five or more options go in a select.SettingsDialog: the web server, not a PC, keeps the bridge-update choice.SetupGuideadds no server route, and its line breaks come fromtext-wraponly.Sidebar.css's row-fill and grid tokens are aliases only.Left open (redesigns, not done here)
shared/:pendingMessages.ts HELD_RECEIPT_MScopiesserver/core/pending.ts'sPI_RESUME_MS;promptText.ts's12_000copies the server'sfinishPromptbody cap.ConnectPhoneDialog AccountQrcould be a QR-session hook (press, shown, take-down, notice) and a view; itsruncounter could be anAbortControllerper press,endinga handle the take-down returns,endShownCodea typed result,pcAccounta tagged union.PendingMessageStore's seven parallel maps need a typed state per row;usePreferencesSync's ~20 refs are a send state machine (a reducer).InboxList's held row order and opening focus could beuseHeldOrderanduseOpeningFocus; itsrestoringref has two meanings.DevicesPanel's three guards,ConversationSearch'spickSerial,pushHealth.ts's two counters; one request sequencer orAbortControllereach.pushHealth.ts endpoint,relay/accountController.ts PairingConsentanddeletion,promptAnswer.ts nameOf().push.ts's module-globalrecoveredhandshake.FirstStartHints' locate effect leaves outfinish(useEffectEvent).Droplet.tsx DISMISS_VELOCITYkeeps its unit only in a removed comment (_PX_PER_MS).SettingsControls useRowSentence's cleanup check exists for a test window without timers.SetupGuide FocusTitledraws nothing so a layout effect runs before the focus trap reads it.Validation
bun run check fast: passed (18,593 unit tests, typecheck, build, generated themes and types).conventions.test.tsandi18n.test.tsincluded. All pass.🤖 Generated with Claude Code