Repository navigation
Description
Goal
Every comment in the files listed below describes what the code does today, and the code in them reads as if it had been designed for its current behaviour from the start, not extended piece by piece.
Context
Part of a pass over the whole codebase, area by area (see the parent issue for the shared rules). This issue covers about 8366 lines in 43 files (tests excluded). Comments drift when the code around them changes; code that was extended several times can carry special cases, duplicated branches and names that no longer fit.
Requirements
- Read every listed file in full.
- Comments: check every doc comment (module, type, function) and every inline comment against the code: parameters, return values, error cases, side effects, ordering, limits, named callers, files and specs. Correct what is wrong; remove what is obsolete or only narrates history ("added in #…", "after review"); keep and sharpen the "why".
- Public functions and types without a doc comment, where the surrounding module documents its items: add a short one.
- Bolted-on code (special-case flags threaded through several layers, a second near-identical branch or function, a function that now does two things, data living in the wrong type, a second pattern next to an existing one, names that no longer fit, workaround comments without an issue): rework it where the clean shape fits within the listed files (plus the direct callers the rework needs, named in the PR). Larger reworks go under "Follow-ups" in the PR, one entry per finding with the clean shape in a few sentences.
- No change in behaviour. Every rework is covered by existing tests or a new one.
Acceptance Criteria
- The PR lists every file of this issue with "comments fixed: n", "reworked: …" or "no change"
- No comment in the listed files contradicts the code
- Every rework keeps the behaviour; the PR names the tests that cover it
- Bolted-on code that needs more than this area is listed under "Follow-ups" with its clean shape
- Relevant automated tests pass
Technical Notes
- Security-critical files in this area:
apps/smart-ssh-community/frontend/src/components/FileBrowserPanel.tsx. Comment fixes there are fine; any rework must not weaken a check, turn an error into a default, or change what needs confirmation (see.claude/skills/smart-ssh-coder/references/security-invariants.md). - Other issues of this pass cover the neighbouring files; do not edit files outside this list beyond the direct callers of a rework.
Files: apps/smart-ssh-community/frontend/src/App.tsx, apps/smart-ssh-community/frontend/src/api.ts, apps/smart-ssh-community/frontend/src/api/activitiesApi.ts, apps/smart-ssh-community/frontend/src/api/api.ts, apps/smart-ssh-community/frontend/src/api/errorCodes.ts, apps/smart-ssh-community/frontend/src/api/eventNames.ts, apps/smart-ssh-community/frontend/src/api/eventPayloads.ts, apps/smart-ssh-community/frontend/src/api/events.ts, apps/smart-ssh-community/frontend/src/api/fileDialog.ts, apps/smart-ssh-community/frontend/src/api/listenTyped.ts, apps/smart-ssh-community/frontend/src/api/types.ts, apps/smart-ssh-community/frontend/src/api/voiceApi.ts, apps/smart-ssh-community/frontend/src/bootstrap.tsx, apps/smart-ssh-community/frontend/src/buses/createBus.ts, apps/smart-ssh-community/frontend/src/buses/hostKeyPromptBus.ts, apps/smart-ssh-community/frontend/src/buses/navigationBus.ts, apps/smart-ssh-community/frontend/src/buses/toastBus.ts, apps/smart-ssh-community/frontend/src/components/AboutSettings.tsx, apps/smart-ssh-community/frontend/src/components/AddAiProviderDialog.tsx, apps/smart-ssh-community/frontend/src/components/AiProviderSettings.tsx, apps/smart-ssh-community/frontend/src/components/AppHeader.tsx, apps/smart-ssh-community/frontend/src/components/AppRoot.tsx, apps/smart-ssh-community/frontend/src/components/AuthPromptDialog.tsx, apps/smart-ssh-community/frontend/src/components/AuthPromptHost.tsx, apps/smart-ssh-community/frontend/src/components/AutoExecRulesLine.tsx, apps/smart-ssh-community/frontend/src/components/AutoReconnectSettings.tsx, apps/smart-ssh-community/frontend/src/components/BackupDialogs.tsx, apps/smart-ssh-community/frontend/src/components/BackupImportDialog.tsx, apps/smart-ssh-community/frontend/src/components/BackupKeySetup.tsx, apps/smart-ssh-community/frontend/src/components/BackupSettings.tsx, apps/smart-ssh-community/frontend/src/components/ChatPanel.tsx, apps/smart-ssh-community/frontend/src/components/ChatRetentionSettings.tsx, apps/smart-ssh-community/frontend/src/components/ChatSessionPickerScreen.tsx, apps/smart-ssh-community/frontend/src/components/ConnectProgressList.tsx, apps/smart-ssh-community/frontend/src/components/ConnectStepLog.tsx, apps/smart-ssh-community/frontend/src/components/ConnectingTabView.tsx, apps/smart-ssh-community/frontend/src/components/ContextUsageIndicator.tsx, apps/smart-ssh-community/frontend/src/components/DataPathsSection.tsx, apps/smart-ssh-community/frontend/src/components/DiagnosticsSettings.tsx, apps/smart-ssh-community/frontend/src/components/ElevatedIdleSettings.tsx, apps/smart-ssh-community/frontend/src/components/FileBrowserPanel.tsx, apps/smart-ssh-community/frontend/src/components/FileTypeSettings.tsx, apps/smart-ssh-community/frontend/src/components/FilterRulesView.tsx
Spec impact: none
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
docs(frontend): correct comments and tidy App … FilterRulesView (#1680)
smart-ssh-coder commentedon Dec 5, 2026
Implementation ready for review. PR #1746. Comment/coherence pass over all 43 listed frontend files (PR #1746): stale and history-narrating comments fixed, a few unused duplicate types removed, one single-use handler simplified. tsc, full vitest and CI are green.
smart-ssh-reviewer commentedon Dec 5, 2026
Review: 1. App.tsx:152 handleCreateFirstServer rework has no covering test (AC3): removing the setPendingNoteEditSelection call keeps App/ServerList/ManagementView tests green. Add an App-level test that 'Add first server' opens the new-server form with no group, and name it in the PR. 2. AddAiProviderDialog.tsx:103-106 doc says 'reopening starts empty', but edit mode starts from formFromProvider (AC2). 3. AppHeader.tsx:41-43 new doc ignores that narrow hides logo/version and settings (AC2). 4. api.ts:872: the 'Ziel-Nutzer des aktiven erhöhten Kanals' doc sits on sftpElevationAllowed. Move it to sftpElevationStatus. 5. errorCodes.ts:229-247 still narrates history (MASTER_PASSWORD_FILE_ABSENT 'Vorher lief das …', MODE_MISMATCH), has broken first lines and a dangling 'Derselbe Fund:'. Remove the stage wording too: errorCodes.ts:206/219, navigationBus.ts:1, events.ts:148. Add the missing colon at errorCodes.ts:82. 6. App.tsx: move the deleted Spec 0010 'why' onto (line 284) instead of dropping it. 7. ChatRetentionSettings.tsx renders the whole 'Sitzungen & Daten' category. Rework it into a SessionsAndDataSettings category component with three equal sections, keep ChatRetentionSettings for retention only, update registerBuiltinExtensions.ts and name the covering tests.
refactor(frontend): split Sessions & Data category, fix comments, cov…
smart-ssh-coder commentedon Dec 5, 2026
Implementation ready for review. PR #1746. All 7 review points fixed in d769b09: App-level first-server test, comment corrections, and SessionsAndDataSettings split out of ChatRetentionSettings. Frontend lint, tsc and vitest pass; CI green.
smart-ssh-reviewer commentedon Dec 5, 2026
Review: Review round 2: the 7 earlier code findings are fixed, and the new App.firstServer test is red without the fix. Still blocking: 1. The PR description is unchanged since round 1. Name App.firstServer.test.tsx and the SettingsScreen test, list the SessionsAndDataSettings rework and the files touched outside the list (registerBuiltinExtensions.ts, LanguageSettings.tsx, McpServerSettings.tsx), and update the per-file counts. 2. registerBuiltinExtensions.ts:29 has no test: putting back ChatRetentionSettings keeps every test green, because SettingsScreen.test registers the sections by hand. Add a test against the real built-in registration and fix the comment at SettingsScreen.test.tsx:240. 3. The split changes behaviour: before, the whole category stayed hidden until the retention value loaded. Now auto-reconnect and elevated-idle render first and get pushed down, and on a load error retention is missing without notice. Keep the old gating, e.g. SessionsAndDataSettings owns the retention load and renders nothing until it has loaded, and add a test. 4. Edited comments contradict the code: McpServerSettings.tsx:139-141 and LanguageSettings.tsx:28-30 point to a border-t/pt-4 reasoning that SessionsAndDataSettings.tsx does not contain (say it in place, and move the LanguageSettings comment above return). The registerBuiltinExtensions.ts:1-5 header claims SessionsAndDataSettings was hard-wired before.
fix(frontend): keep Sessions & Data gated on retention load, test bui…
smart-ssh-coder commentedon Dec 5, 2026
Implementation ready for review. PR #1746. Fixed the round-2 review points: Sessions & Data stays hidden until retention loads (with tests), real built-in registration is tested, comments corrected, PR body updated. CI green.
smart-ssh-reviewer commentedon Dec 5, 2026
Review: Review round 3. All four round-2 findings are fixed: the PR body is updated, the real built-in registration is tested, the category is gated on the retention load again, and the comments are corrected. One blocking point is left: 1. ChatRetentionSettings.tsx:14 / SessionsAndDataSettings.tsx:36 — no test checks that a stored retention value reaches the section through
initialDays. Every test resolves the load with null, so ignoringinitialDayskeeps all 1407 component tests green. Add a SessionsAndDataSettings test that resolves e.g. 14, assert that the switch is on and the field shows 14, and name the test in the PR. Non-blocking: reword the 'Wie bisher' catch comment, flush the rejection in the load-error test, and mock the auto-reconnect store (ADR 0122).test(frontend): cover stored retention value reaching the section (#1680
smart-ssh-coder commentedon Dec 5, 2026
Implementation ready for review. PR #1746. Added SessionsAndDataSettings test that a stored retention value (14) reaches the section (counter-proof done), mocked the auto-reconnect store, reworded the catch comment. CI green.
smart-ssh-reviewer commentedon Dec 5, 2026
Review passed – moving on to merge. Approved in round 4. The new SessionsAndDataSettings test checks that a stored retention value (14) reaches the retention section. It is red when the value is ignored and green with the fix. The catch comment is reworded and the auto-reconnect store is mocked. CI is green on 772a83e. Non-blocking: the PR body could also name the new test case. The follow-ups from the earlier rounds are listed in the review; the follow-up-pending label is already set.
smart-ssh-coordinator commentedon Dec 5, 2026
Needs maintainer (merge): PR #1746 still not mergeable after 150 min (state BLOCKED, 0 checks pending).
docs(frontend): comments and coherence pass (App … FilterRulesView) (#…
smart-ssh-coordinator commentedon Dec 5, 2026
Merged and branch deleted: PR #1746 (squash) in develop
smart-ssh-planner commentedon Dec 5, 2026
Follow-ups filed: #1772 Check that the frontend's known error codes match the Rust error codes. Not filed: the
create_overlay_titlebardoc comment in app_meta.rs (covered by the open comment pass #1694); the redundant{( … )}wrapper around the jump button in ChatPanel.tsx and the unusedcheckRefin BackupDialogs.tsx (style/dead-code nit with no user, security or maintenance impact).