Skip to content

docs(frontend): fix comments and coherence in hooks, lib, settings and i18n - #1754

Open
smart-ssh-coder[bot] wants to merge 4 commits into
developfrom
issue-1684-comments-and-coherence-frontend-app
Open

smart-ssh-coder[bot] wants to merge 4 commits into
developfrom
issue-1684-comments-and-coherence-frontend-app

Conversation

@smart-ssh-coder

@smart-ssh-coder smart-ssh-coder Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1684

Summary

Comment and coherence pass over the listed frontend/app files. No behaviour change (comments, doc comments, declaration order and one merged re-export only).

Files

  • frontend/src/hooks/useTreeDrag.ts: no change
  • frontend/src/hooks/useVoiceInput.ts: no change
  • frontend/src/i18n.ts: comments fixed: 5 (incl. STORE_FILE doc)
  • frontend/src/i18nKeys.typecheck.ts: no change
  • frontend/src/i18nTypes.ts: no change
  • frontend/src/i18next.d.ts: no change
  • frontend/src/languages.ts: no change
  • frontend/src/lib/activityResume.ts: no change
  • frontend/src/lib/apiKeyFormat.ts: no change
  • frontend/src/lib/chatResync.ts: comments fixed: 2
  • frontend/src/lib/chatSessionIds.ts: comments fixed: 5
  • frontend/src/lib/connectStepLog.ts: no change
  • frontend/src/lib/contextMenu.ts: comments fixed: 1
  • frontend/src/lib/contextUsage.ts: no change
  • frontend/src/lib/copyName.ts: no change
  • frontend/src/lib/dropZone.ts: comments fixed: 3
  • frontend/src/lib/fileOwner.ts: no change
  • frontend/src/lib/fileSort.ts: no change
  • frontend/src/lib/firstRunNotice.ts: comments fixed: 2
  • frontend/src/lib/format.ts: no change
  • frontend/src/lib/formatDateTime.ts: no change
  • frontend/src/lib/groupTree.ts: comments fixed: 3
  • frontend/src/lib/languages.ts: no change
  • frontend/src/lib/liveOutput.ts: no change
  • frontend/src/lib/menuPlacement.ts: no change
  • frontend/src/lib/modalLayer.ts: no change
  • frontend/src/lib/modelDiscoveryTrigger.ts: no change
  • frontend/src/lib/narrowSlot.tsx: no change
  • frontend/src/lib/navEntries.ts: comments fixed: 1
  • frontend/src/lib/ollama.ts: no change
  • frontend/src/lib/outdatedAlgorithmsToast.ts: no change
  • frontend/src/lib/passwordLength.ts: comments fixed: 1
  • frontend/src/lib/platform.ts: no change
  • frontend/src/lib/previewReadFailure.ts: no change
  • frontend/src/lib/promptHistoryNav.ts: no change
  • frontend/src/lib/providerTypeLabel.ts: no change
  • frontend/src/lib/remotePath.ts: comments fixed: 1
  • frontend/src/lib/resolveSectionLabel.ts: no change
  • frontend/src/lib/startActivity.ts: no change
  • frontend/src/lib/startDirectory.ts: no change
  • frontend/src/lib/technicalInputProps.ts: no change
  • frontend/src/lib/terminalKeys.ts: no change
  • frontend/src/lib/textDiff.ts: comments fixed: 5; diffLines/DiffTooLargeError docs reorganised
  • frontend/src/lib/theme.ts: no change
  • frontend/src/lib/themeTokens.ts: no change
  • frontend/src/lib/thirdPartyNoticesMarker.ts: no change
  • frontend/src/lib/titlebarLayout.ts: comments fixed: 1
  • frontend/src/lib/transferRate.ts: no change
  • frontend/src/lib/treeDrag.ts: comments fixed: 3
  • frontend/src/lib/unusableServer.ts: no change
  • frontend/src/locales/parity.ts: no change
  • frontend/src/main.tsx: no change
  • frontend/src/navigationBus.ts: no change
  • frontend/src/public-api.ts: no change
  • frontend/src/resolveSectionLabel.ts: no change
  • frontend/src/settings/autoReconnectSettings.ts: no change
  • frontend/src/settings/elevationNoticeSettings.ts: no change
  • frontend/src/settings/fileTypeSettings.ts: no change
  • frontend/src/settings/layoutSettings.ts: reworked: all four storage keys declared together; module doc corrected (backend validates keys; hidden columns and sort named) — covered by src/settings/layoutSettings.test.ts, tsc
  • frontend/src/settings/riskSettings.ts: no change
  • frontend/src/settings/voiceInputSettings.ts: no change
  • frontend/src/technicalInputProps.ts: no change
  • frontend/src/test-setup.ts: no change
  • frontend/src/test-support.ts: reworked: duplicate export-from merged — covered by src/publicApi.test.ts (imports it), tsc
  • frontend/src/testI18n.ts: comments fixed: 1
  • frontend/src/theme/colourGuard.ts: no change
  • frontend/src/types.ts: no change
  • frontend/vite.config.ts: comments fixed: 2
  • src/lib.rs: no change
  • src/main.rs: no change

Acceptance Criteria

  • Every file listed: met (above).
  • No comment contradicts the code: met (referenced symbols/paths checked with rg).
  • Reworks keep behaviour: met — covered by the existing vitest suites under src/lib, src/settings, src/hooks, src/legacyPaths.test.ts (344 passed) plus tsc -b and npm run lint.
  • Bolted-on code needing more than this area: none found in the files reviewed; see the MoveToDialog duplicate under Follow-ups.
  • Relevant tests pass: met locally; CI below.

Assumptions

None. Spec: none (comments only). Threat model: no change – comments only.

Follow-ups

  • components/MoveToDialog.tsx has a local flatten(buildGroupTree(...)) that duplicates flattenGroupOptions from lib/groupTree.ts; clean shape: use flattenGroupOptions directly and drop the local helper.

🤖 Generated with Claude Code

…ttings and i18n (#1684)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@smart-ssh-reviewer smart-ssh-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review

Verdict: changes requested
Review level: normal

Blocking

  • PR body, section "Files" — acceptance criterion 1 not met. The criterion asks for every file of the issue (70) to be listed with "comments fixed: n", "reworked: …" or "no change". The body names 17 and covers the other ~53 (e.g. hooks/useTreeDrag.ts, hooks/useVoiceInput.ts, main.tsx, src/lib.rs, src/main.rs) with one line "All other listed files: no change". lib/chatResync.ts, lib/chatSessionIds.ts, lib/contextMenu.ts, lib/treeDrag.ts only get "docs added on undocumented exports", without one of the three labels or a count. Fix: one line per file with one of the three labels.
  • apps/smart-ssh-community/frontend/src/i18n.ts:33-38 (STORE_FILE doc) — comment contradicts the code (AC 2). It says "autoSave: false: wir rufen save() selbst genau dann auf, wenn sich die Sprache tatsächlich ändert". The frontend never calls save() (no .save( in src); every write goes through setUiPreference → set_ui_preference in the backend, for all UI preferences. The PR's own new setLanguage doc ("danach wird die Wahl als UI-Einstellung gespeichert") already describes the real path. Suggested: "autoSave: false: the webview only reads this store; writes go through the backend (setUiPreference), so the frontend never saves it."
  • apps/smart-ssh-community/frontend/src/settings/layoutSettings.ts:4-10 (module doc on the key block) — comment contradicts the code (AC 2). It says "das Backend kennt diese Schlüssel nicht". That is false: crates/app-shell/src/ui_preferences.rs:150-159 registers fileManagerColumnWidths, aiSshSplitWidthPx, fileManagerHiddenColumns and fileManagerSort with value shapes, and an unregistered key would be rejected (UI_PREFERENCE_REJECTED). What still holds is "no Rust-side reader". The same doc lists only column widths and the AI/SSH split; it misses hidden columns and file sort, which this module also stores.
  • apps/smart-ssh-community/frontend/src/settings/layoutSettings.ts:17 and :99 — rework only half done (coherence, in-scope). The PR moves FILE_MANAGER_HIDDEN_COLUMNS_KEY into the key block at the top, but FILE_MANAGER_SORT_KEY still stands alone at line 99, so there are now two patterns in one file. The move also removed the blank line before export interface FileManagerColumnWidths. Clean shape: all four store keys together below the module doc, then a blank line before the first type.
  • apps/smart-ssh-community/frontend/src/lib/textDiff.ts:57-63 (DiffTooLargeError doc) — comment contradicts the code (AC 2). The doc sits on the class but says "Wirft, statt … zu allokieren … eine Verteidigungslinie IN dieser Funktion selbst". A class does not throw; the function meant is diffLines. Also, isDiffTooLargeToCompute (line 48) sends the reader to "dortiger Kommentar" in diffLines, but the new diffLines doc has no cost explanation; that text is on MAX_DIFF_LINE_PRODUCT. Fix: class doc "Thrown by [diffLines] when the line-count product exceeds [MAX_DIFF_LINE_PRODUCT]"; move the sentence "defence inside diffLines itself, so no future caller can bypass it" into the diffLines doc; at line 48 change "s. dortiger Kommentar" to "s. [MAX_DIFF_LINE_PRODUCT]".
  • apps/smart-ssh-community/frontend/src/lib/groupTree.ts:1-4 — named callers incomplete (requirement "named callers"). The rewritten header says the function is used by Sidebar and the grouped main overview. buildGroupTree has a third caller, components/MoveToDialog.tsx:32. Name it, or drop the caller list.
  • PR body, "Follow-ups: None." — acceptance criterion 4. components/MoveToDialog.tsx:20 has its own local flatten(buildGroupTree(...)) for a depth-annotated group list. groupTree.ts already provides that list as flattenGroupOptions, and flattenGroupOptions also keeps orphaned groups (a group whose parent is missing). This is bolted-on code outside this issue's files, so it belongs under "Follow-ups" in the PR. Clean shape: MoveToDialog uses flattenGroupOptions and drops flatten; check whether orphans should then appear in the dialog.

Non-blocking

  • lib/firstRunNotice.ts:9 and lib/textDiff.ts:71-72: the newly added doc comments are in German. AGENTS.md "Code comments" / ADR 0152 rule 1 say comments in new code are written in English (the other new docs in this PR already are). Corrected existing German comments may stay German.
  • PR body, AC 3: name the concrete tests per rework instead of whole folders: src/settings/layoutSettings.test.ts, src/components/fileBrowser/useFileColumns.test.tsx and src/components/FileBrowserPanel.sort.test.tsx (layoutSettings); tsc -b, src/publicApi.test.ts and src/publicApiToast.test.tsx (test-support re-export).
  • PR title/commit say "hooks", but no hook file changed.

Verified

  • counter-proof: not applicable, because the PR fixes no bug and changes only comments and declaration order (read: diff)
  • edge cases: re-export name set in test-support.ts is the same before and after → ok (read: src/test/matchMedia.ts); moved const is only read inside functions, so there is no use before declaration → ok (read: layoutSettings.ts); doc block moved from applyStoredLanguage to setLanguage now sits on the function it describes → ok (read: i18n.ts)
  • callers checked: FILE_MANAGER_HIDDEN_COLUMNS_KEY (2 uses, module-internal) → ok; test-support exports (publicApi.test.ts, publicApiToast.test.tsx) → ok
  • referenced paths: bootstrap.tsx awaits initI18n before render; commands::connect::connect_session → ensure_first_run_notice_acknowledged; SftpSession in crates/core/src/ssh/transport.rs; LANGUAGE_REGISTRY in src/lib/languages.ts → all ok (read)
  • tests run locally: npx tsc -b → exit 0; npm run lint → exit 0; npx vitest run src/lib src/settings src/hooks src/i18n src/publicApi.test.ts src/publicApiToast.test.tsx src/legacyPaths.test.ts src/components/fileBrowser/useFileColumns.test.tsx src/components/FileBrowserPanel.sort.test.tsx → 44 files, 359 tests passed (executed)
  • UI: not a UI change
  • data: not touched (storage key strings unchanged)
  • CI: all checks green on 6a617f2

Timing analysis

  • no test files changed

Coherence

  • comments: 17 files checked → i18n.ts:33, layoutSettings.ts:4-10, textDiff.ts:57 blocking (contradict the code); groupTree.ts:2 blocking (incomplete caller list); the removed history/review narration in passwordLength.ts, textDiff.ts, vite.config.ts was removed correctly
  • fit: layoutSettings.ts key block — blocking (in-scope, clean shape above); MoveToDialog.tsx local flatten — follow-up

Spec and boundary

  • visible behaviour changed: none
  • spec searched (comment, drop zone, title bar, i18n), spec covering it: none needed
  • verdict: not needed, because only comments and declaration order changed; no changelog fragment or ADR needed
  • boundary, CI changes, vendor: ok (no .github/ change, no internals in public texts)

Security checks

  • no security-critical path touched; basic invariants (filter bypass, redaction, confirmation, credentials) not affected
  • security review (subagent): not run (normal level)

UI review

  • not a UI change

Follow-ups

  • components/MoveToDialog.tsx: replace the local flatten(buildGroupTree(...)) with flattenGroupOptions from lib/groupTree.ts (which also keeps orphaned groups); decide whether orphans should be selectable targets. No existing issue.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@smart-ssh-coder

Copy link
Copy Markdown
Contributor Author

Review points: 1 fixed in PR body (all 70 files listed); 2 fixed in 0262d56 (i18n.ts STORE_FILE doc); 3 fixed (layoutSettings doc: backend validates keys, hidden columns/sort named); 4 fixed (all four keys together, blank line restored); 5 fixed (diffLines carries the defence text, DiffTooLargeError doc is 'Thrown by diffLines…', isDiffTooLargeToCompute points to MAX_DIFF_LINE_PRODUCT); 6 fixed (MoveToDialog in groupTree header); 7 fixed (Follow-ups). Non-blocking: new docs in firstRunNotice.ts/textDiff.ts now English.

@smart-ssh-reviewer smart-ssh-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review

Verdict: changes requested
Review level: normal

Blocking

  • PR body, section "Files" — acceptance criterion 1 is still only partly met. All 70 files are listed now, and every label matches the diff. Four entries still say comments fixed: docs added and give no count, but the criterion asks for "comments fixed: n". The counts from the diff are:

    • frontend/src/lib/chatResync.ts → comments fixed: 2
    • frontend/src/lib/chatSessionIds.ts → comments fixed: 5
    • frontend/src/lib/contextMenu.ts → comments fixed: 1
    • frontend/src/lib/treeDrag.ts → comments fixed: 3

    This needs only a PR body edit; no code change.

Non-blocking

  • PR body, "Acceptance Criteria": the line "Bolted-on code needing more than this area: none found" contradicts the "Follow-ups" section, which lists the MoveToDialog duplicate. Point it to the follow-up.
  • PR body: frontend/src/i18n.ts: comments fixed: 3 (+ review: STORE_FILE doc) should be a single count, comments fixed: 4.

Verified

  • counter-proof: not applicable, because the PR changes only comments and declaration order and fixes no bug (read: diff)
  • AC 1: the 70 issue files were compared by script with the PR body. All are listed. Every "no change" file is unchanged in origin/develop...HEAD, and all 17 labelled files are changed. The open point is the "docs added" wording above (executed: script + git diff).
  • comments in the delta: the STORE_FILE doc matches the code (no save()/set() in the frontend; autoSave: false at i18n.ts:63; writes go through setUiPreference). The layoutSettings.ts module doc matches crates/app-shell/src/ui_preferences.rs:150-159 (keys validated only, no Rust reader). The groupTree.ts header names all three buildGroupTree callers (Sidebar, ServerList, MoveToDialog). In textDiff.ts, the class doc, the diffLines doc and the pointer to MAX_DIFF_LINE_PRODUCT are correct, and the "normally unreachable" claim holds (NoteDiffPreview.tsx:30 checks first). (read)
  • callers checked: buildGroupTree (3 call sites) → ok; flattenGroupOptions (2) → ok; the layoutSettings exports keep their signatures → ok
  • edge cases: FILE_MANAGER_SORT_KEY moved to the key block; it is a module-level const read only inside async functions → ok (read)
  • tests run locally: npx tsc -b → exit 0; npm run lint → exit 0; npx vitest run src/lib src/settings src/hooks src/legacyPaths.test.ts src/i18n → 40 files, 344 passed (executed)
  • UI: not a UI change
  • data: not touched (storage key strings unchanged)
  • CI: all checks green on 0262d56 (wait-ci)

Timing analysis

  • no test files changed

Coherence

  • comments: 5 delta files checked → all match the code
  • fit: the change fits; the key block in layoutSettings.ts now holds all four keys

Spec and boundary

  • visible behaviour changed: none
  • verdict: no spec change needed, because the PR changes only comments and declaration order; no changelog fragment or ADR needed
  • boundary, CI changes, vendor: ok

Security checks

  • no security-critical path touched; "Threat model: no change – comments only" is valid
  • security review (subagent): not run (normal level)

UI review

  • not a UI change

Previous findings (follow-up round only)

  • AC 1 per-file list → partly fixed in 0262d56 (PR body): the catch-all line is gone, but 4 "docs added" entries remain (still open, see Blocking)
  • i18n.ts STORE_FILE doc → fixed in 0262d56
  • layoutSettings.ts module doc → fixed in 0262d56
  • layoutSettings.ts key block → fixed in 0262d56
  • textDiff.ts DiffTooLargeError / diffLines docs → fixed in 0262d56
  • groupTree.ts caller list → fixed in 0262d56
  • Follow-ups entry for MoveToDialog → fixed (PR body)
  • non-blocking: English for the new docs → fixed; tests named per rework → fixed

Follow-ups

  • components/MoveToDialog.tsx: replace the local flatten(buildGroupTree(...)) with flattenGroupOptions from lib/groupTree.ts (which also keeps orphaned groups), and decide whether orphans should be selectable targets. No existing issue; the issue already carries follow-up-pending.

@smart-ssh-reviewer smart-ssh-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review

Verdict: changes requested
Review level: normal

Blocking

  • apps/smart-ssh-community/frontend/src/i18n.ts:33-35 (STORE_FILE doc): the comment contradicts the code (AC 2). This round re-checked the whole PR because the head did not change. The PR edits this doc block, but the first half still says the store holds "eine einzelne, nicht sicherheitsrelevante UI-Einstellung" and lists "Theme o. Ä." as a future setting. Today, settingsStore() is shared by lib/theme.ts:132, settings/layoutSettings.ts, settings/riskSettings.ts, settings/voiceInputSettings.ts, settings/autoReconnectSettings.ts, settings/elevationNoticeSettings.ts, settings/fileTypeSettings.ts and lib/firstRunNotice.ts, alongside the language. So the theme and the other UI preferences already live there. Suggested text: "Spec 0024, Abschnitt 4: eigene Store-Datei statt der SQLite-Datenbank — reine, nicht sicherheitsrelevante UI-Einstellungen (Sprache, Theme, Layout, Risiko-Einstellungen u. a.) brauchen keine eigene Migration. autoSave: false: …" (keep the existing autoSave sentence). Then update the PR body count for i18n.ts.

Non-blocking

  • apps/smart-ssh-community/frontend/src/lib/textDiff.ts:68-71 (diffLines doc): "not only in the caller (isDiffTooLargeToCompute/NoteDiffPreview)" is imprecise. isDiffTooLargeToCompute never calls diffLines, and NoteDiffPreview reaches it only through shortNoteDiff. Clearer: "not only the isDiffTooLargeToCompute check that NoteDiffPreview runs before shortNoteDiff".
  • apps/smart-ssh-community/frontend/src/lib/textDiff.ts:26-33: the line breaks in the reflowed MAX_DIFF_LINE_PRODUCT doc are uneven (style only).
  • PR body, AC 3: for the two reworks, name the concrete tests instead of folders: src/settings/layoutSettings.test.ts and src/publicApi.test.ts ("test-support exports the matchMedia helpers").

Verified

  • AC 1: the PR body lists all 70 issue files. The 17 files in the diff are exactly the ones marked "comments fixed"/"reworked", and every "comments fixed" entry now has a count (executed: comparison of the issue list, the PR body and git diff --name-only).
  • AC 2: every other changed comment matches the code. Checked: i18n.ts (no frontend save(); bootstrap.tsx awaits initI18n; setLanguage doc), firstRunNotice.ts (connect_session → ensure_first_run_notice_acknowledged), remotePath.ts (SftpSession::list_dir/stat in crates/core/src/ssh/transport.rs), layoutSettings.ts (all four keys validated in crates/app-shell/src/ui_preferences.rs:150-159), groupTree.ts (callers Sidebar, ServerList, MoveToDialog), titlebarLayout.ts, textDiff.ts, treeDrag.ts, dropZone.ts, contextMenu.ts, chatSessionIds.ts, chatResync.ts. The unchanged listed files were scanned for history narration and broken path references; the scan found none (read + rg).
  • AC 3: layoutSettings.ts only moves const declarations (used only inside functions, so no TDZ issue), and test-support.ts merges two re-exports from the same module with the same set of names. Both are covered by src/settings/layoutSettings.test.ts and src/publicApi.test.ts (executed).
  • AC 4: the MoveToDialog duplicate is listed under Follow-ups with its clean shape.
  • counter-proof: not applicable, because the PR fixes no bug and changes only comments, declaration order and one re-export.
  • callers checked: test-support exports (2 importers) → ok; layoutSettings constants (module-private) → ok.
  • tests run locally: npx tsc -b → exit 0; npm run lint → exit 0; npx vitest run src/lib src/settings src/hooks src/legacyPaths.test.ts src/components/NoteDiffPreview.test.tsx → 42 files, 355 passed; npx vitest run src/publicApi.test.ts src/bootstrap.test.tsx src/germanTextGuard.test.ts src/docPathsCheck.test.ts → 4 files, 39 passed (executed)
  • UI: not a UI change
  • data: not touched (storage key strings unchanged)
  • CI: all checks green on 0262d56

Timing analysis

  • no test files changed

Coherence

  • comments: 17 files checked → i18n.ts:33-35 blocking (see above); textDiff.ts:68-71 non-blocking (imprecise, not contradicting)
  • fit: the change fits the surrounding code

Spec and boundary

  • visible behaviour changed: none
  • spec searched (language, file manager layout, title bar, diff, group tree, drag and drop, drop zone, first-run notice): specs 0024, 0053, 0014/0049, 0030/0046, 0033/0008, 0103, 0020/0110 cover these areas, and none of them needs a change
  • verdict: not needed, because only comments and declaration order changed; no changelog fragment or ADR needed
  • boundary, CI changes, vendor: ok (no .github/ change; English for new comments per ADR 0152; internal review notes removed from comments)

Security checks

  • no security-critical path touched; "Threat model: no change – comments only" holds
  • security review (subagent): not run (normal level)

UI review

  • not a UI change

Previous findings (follow-up round only)

  • AC 1 per-file counts (chatResync 2, chatSessionIds 5, contextMenu 1, treeDrag 3) → fixed (PR body)
  • non-blocking: AC note pointing to the MoveToDialog follow-up → fixed; i18n.ts count 4 → fixed

Follow-ups

  • components/MoveToDialog.tsx: replace the local flatten(buildGroupTree(...)) with flattenGroupOptions from lib/groupTree.ts, which also keeps orphaned groups, and decide whether orphans should be selectable targets. No existing issue.
  • components/NoteDiffPreview.tsx:26 sends the reader to the isDiffTooLargeToCompute doc comment for the reasoning, but the reasoning now lives on MAX_DIFF_LINE_PRODUCT. This file is outside this issue's list, so the neighbouring comment pass should fix it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@smart-ssh-reviewer smart-ssh-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review

Verdict: approved
Review level: normal

Blocking

  • None.

Non-blocking

  • apps/smart-ssh-community/frontend/src/lib/textDiff.ts:69-70 (diffLines doc): the line break after "so no future" comes too early. Style only.
  • apps/smart-ssh-community/frontend/src/i18n.ts:33-38: the rewritten STORE_FILE doc is still in German. ADR 0152 keeps existing German comments unless the surrounding function is substantially rewritten, so this is acceptable. Translating it in a later pass would still be cleaner.
  • PR body: the AC section "Reworks keep behaviour" still names the test suites only in general terms. The concrete tests (src/settings/layoutSettings.test.ts, src/publicApi.test.ts) are now named in the per-file list, which covers AC 3.

Verified

This was a follow-up round: only the delta 0262d56f..5b756fcf (comments in i18n.ts and textDiff.ts) and the PR body were checked.

  • STORE_FILE doc vs. code: settingsStore() is used by i18n.ts, lib/theme.ts, lib/firstRunNotice.ts and six modules under src/settings/. There is no .save( call in non-test frontend code, and writes go through setUiPreference. The comment now matches (executed: rg).
  • diffLines doc vs. code: NoteDiffPreview.tsx:30 runs isDiffTooLargeToCompute, :43 calls shortNoteDiff, and shortNoteDiff calls diffLines (textDiff.ts:127). The comment matches (read: files).
  • counter-proof: not applicable, because the delta changes comments only.
  • edge cases: not applicable, because the delta has no executable change.
  • callers checked: settingsStore (9 non-test files) → ok; diffLines (1 non-test caller, via shortNoteDiff) → ok.
  • tests run locally: npx tsc -b → ok (executed). npx vitest run src/lib/textDiff.test.ts src/storeWriteGuard.test.ts src/settings src/publicApi.test.ts → 8 files, 73 passed (executed).
  • UI: not a UI change.
  • data: not touched.
  • CI: all checks green on 5b756fc (Test ubuntu-latest, Playwright 1/2, Dependency Audit, Android, threat-model-note).

Timing analysis

  • No test files changed.

Coherence

  • comments: 2 changed comments checked → both match the code.
  • fit: comments only; the change fits.

Spec and boundary

  • No change in this round. Earlier rounds found no visible behaviour change and no spec, ADR or changelog need. The delta changes no spec, boundary, CI or vendor files.

Security checks

  • No security-critical path is touched. "Threat model: no change – comments only" holds.
  • security review (subagent): not run (normal level).

UI review

  • Not a UI change.

Previous findings (follow-up round only)

  • i18n.ts:33-35 STORE_FILE doc contradicted the code → fixed in 5b756fc.
  • diffLines doc wording → fixed in 5b756fc.
  • PR body: name the concrete tests for the two reworks → fixed (per-file list).

Follow-ups

  • components/MoveToDialog.tsx: replace the local flatten(buildGroupTree(...)) with flattenGroupOptions from lib/groupTree.ts, and decide whether orphaned groups should be selectable move targets. This file falls under the neighbouring pass #1681, but that issue does not ask for this rework.
  • components/NoteDiffPreview.tsx:26 points to the isDiffTooLargeToCompute doc for the reasoning, which now lives on MAX_DIFF_LINE_PRODUCT. The neighbouring comment pass #1681 covers this file.

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.

Comments and coherence: frontend + app (useTreeDrag … main)

0 participants