Structural audit: record 12's commit; defer 13 and 14

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 18:47:16 +00:00
co-authored by Claude Opus 5.5
parent 7e794ffffe
commit 902f036ba0
+4 -4
View File
@@ -11,7 +11,7 @@ Items are worked through in the order below. Status: open, done (commit), or clo
| 1 | Request failures reach frontends as strings, so they guess the kind by substring (`BanListDialog`, `ServerLogDialog`) and core needs a sentinel message (`SEARCH_NOT_PERMITTED`); success is signalled by a `null` error, here and in Android's `ServerController` (`String?`) | done (`0552ed8`): requests return `CompletableFuture`, failing with `RequestException` (kind + message); `Replies`/`Edt` split success and failure; Android uses `Result` | | 1 | Request failures reach frontends as strings, so they guess the kind by substring (`BanListDialog`, `ServerLogDialog`) and core needs a sentinel message (`SEARCH_NOT_PERMITTED`); success is signalled by a `null` error, here and in Android's `ServerController` (`String?`) | done (`0552ed8`): requests return `CompletableFuture`, failing with `RequestException` (kind + message); `Replies`/`Edt` split success and failure; Android uses `Result` |
| 2 | Client properties parsed twice: `ConnectionEventHandler.onClientJoin` sets every field, `onClientChanged` the same ones again; channels already share `applyChannelProperties` | done (`e255a46`): one `applyClientProperties`. It also fixed a joining channel commander shown as none, and picks up the description a client enters with | | 2 | Client properties parsed twice: `ConnectionEventHandler.onClientJoin` sets every field, `onClientChanged` the same ones again; channels already share `applyChannelProperties` | done (`e255a46`): one `applyClientProperties`. It also fixed a joining channel commander shown as none, and picks up the description a client enters with |
| 3 | What we may do is answered in five places: `ServerSession.can*`, `ServerModel.can*/permits/mayHavePower`, `TeamspeakConnection.canSendOfflineMessages/canTransferFiles`, and raw permission names in Swing dialogs and `ServerController.canCreateBans` | done (`13e3a62`): `Permissions` owns the table, the rules and one named question per capability; `ServerSession.permissions()` is `NONE` while disconnected; no permission names outside core except channel-permission editing | | 3 | What we may do is answered in five places: `ServerSession.can*`, `ServerModel.can*/permits/mayHavePower`, `TeamspeakConnection.canSendOfflineMessages/canTransferFiles`, and raw permission names in Swing dialogs and `ServerController.canCreateBans` | done (`13e3a62`): `Permissions` owns the table, the rules and one named question per capability; `ServerSession.permissions()` is `NONE` while disconnected; no permission names outside core except channel-permission editing |
| 4 | `TeamspeakConnection` (2,157 lines) still does lifecycle, mic/speaker, recording, chat logs, log/sound text, contacts, avatars, icons, file transfers, myTeamSpeak and job plumbing. The `*Admin` helpers take the whole connection, which forwards ~90 methods to them | in progress, in sub-steps: | | 4 | `TeamspeakConnection` (2,157 lines) still does lifecycle, mic/speaker, recording, chat logs, log/sound text, contacts, avatars, icons, file transfers, myTeamSpeak and job plumbing. The `*Admin` helpers take the whole connection, which forwards ~90 methods to them | done, in sub-steps (now 841 lines): |
| 4a | … chat log and what we tell the user (log lines, sounds, links and sound variables) | done (`1bc7eb5`): `ChatLog`, `Announcer` | | 4a | … chat log and what we tell the user (log lines, sounds, links and sound variables) | done (`1bc7eb5`): `ChatLog`, `Announcer` |
| 4b | … request plumbing into its own class; `*Admin` helpers on narrow dependencies instead of the whole connection | done (`da908f7`; renamed `Uplink` in 4c, as `session.ServerLink` is the `ts3server://` link): `ServerLink` owns the socket, event and request threads and file transfers, and runs requests; the helpers take it (plus the model, permissions or avatars where they need them) | | 4b | … request plumbing into its own class; `*Admin` helpers on narrow dependencies instead of the whole connection | done (`da908f7`; renamed `Uplink` in 4c, as `session.ServerLink` is the `ts3server://` link): `ServerLink` owns the socket, event and request threads and file transfers, and runs requests; the helpers take it (plus the model, permissions or avatars where they need them) |
| 4c | … frontends reach the admin helpers directly instead of ~40 one-line forwarders | done (`959f7ed`): the helpers are public with non-blocking methods, reached through `ServerSession`/`TeamspeakConnection` getters; 30 forwarders gone, and what they added (stop-at-first-refusal loops, log lines, description refresh, own avatar flag) moved into the helpers. Swing dialogs still take the whole connection for the model and our ids (item 5) | | 4c | … frontends reach the admin helpers directly instead of ~40 one-line forwarders | done (`959f7ed`): the helpers are public with non-blocking methods, reached through `ServerSession`/`TeamspeakConnection` getters; 30 forwarders gone, and what they added (stop-at-first-refusal loops, log lines, description refresh, own avatar flag) moved into the helpers. Swing dialogs still take the whole connection for the model and our ids (item 5) |
@@ -28,6 +28,6 @@ Items are worked through in the order below. Status: open, done (commit), or clo
| 11 | Android `SessionController` (669 lines) is the app-wide view model and service locator; every screen gets all of it | done, in sub-steps: | | 11 | Android `SessionController` (669 lines) is the app-wide view model and service locator; every screen gets all of it | done, in sub-steps: |
| 11a | … the app-wide stores out of it, and screens on the parts they use | done (`382d76c`): `AppParts` wires what lives as long as the process; `BookmarkManager`, `ContactManager`, `WhisperListManager`, `MyTeamSpeakAccount` (sign-in, import, chat attachments) and `AudioSetup` (route, devices, sound packs, floating PTT button) hold what was in `SessionController`, which keeps the servers, the microphone between them and the voice settings (386 lines, with `SessionState` and `SessionEvent`). Leaf screens take only their parts; `App` and the settings hub take `AppParts`. Country flags and description pictures are set on `Settings` directly | | 11a | … the app-wide stores out of it, and screens on the parts they use | done (`382d76c`): `AppParts` wires what lives as long as the process; `BookmarkManager`, `ContactManager`, `WhisperListManager`, `MyTeamSpeakAccount` (sign-in, import, chat attachments) and `AudioSetup` (route, devices, sound packs, floating PTT button) hold what was in `SessionController`, which keeps the servers, the microphone between them and the voice settings (386 lines, with `SessionState` and `SessionEvent`). Leaf screens take only their parts; `App` and the settings hub take `AppParts`. Country flags and description pictures are set on `Settings` directly |
| 11b | … `ServerController` on narrow dependencies instead of the whole `SessionController`, which still forwards the stores to it | done (`6070160`): `ServerParts` holds what every server shares (settings, identities, audio, contacts, myTeamSpeak, notifier, network) and builds its `ServerSession`; `SessionController` lost its pass-throughs and audio setup (`AppParts` builds the `LevelMonitor`). `ServerController` reports back to its owner directly: it has one, so no callback interface | | 11b | … `ServerController` on narrow dependencies instead of the whole `SessionController`, which still forwards the stores to it | done (`6070160`): `ServerParts` holds what every server shares (settings, identities, audio, contacts, myTeamSpeak, notifier, network) and builds its `ServerSession`; `SessionController` lost its pass-throughs and audio setup (`AppParts` builds the `LevelMonitor`). `ServerController` reports back to its owner directly: it has one, so no callback interface |
| 12 | Swing `ui` package: 118 files, flat | done: by feature. `ui` keeps the main window and what is app-wide (frame, commands, menus, toolbar, status bar, tabs, tray, notifications, look-and-feel, window placement); `ui.server` one server's tab (tree, info, context menus and their actions, file browser, connection info); `ui.chat` the chat and the HTML views (pictures, links, zoom); `ui.admin` moderation and the server's list windows; `ui.channel` the channel editor; `ui.options` the Options pages; `ui.hotkey` hotkeys; `ui.manage` bookmarks, contacts, identities and connecting; `ui.icons`; `ui.widget` the shared Swing bits (`Dialogs`, `Edt`, `FindBar`, `FormPanel`, …). What another package uses became public (~200 declarations); nothing else changed. The app icons moved to `ui/icons` with `Icons` | | 12 | Swing `ui` package: 118 files, flat | done (`7e794ff`): by feature. `ui` keeps the main window and what is app-wide (frame, commands, menus, toolbar, status bar, tabs, tray, notifications, look-and-feel, window placement); `ui.server` one server's tab (tree, info, context menus and their actions, file browser, connection info); `ui.chat` the chat and the HTML views (pictures, links, zoom); `ui.admin` moderation and the server's list windows; `ui.channel` the channel editor; `ui.options` the Options pages; `ui.hotkey` hotkeys; `ui.manage` bookmarks, contacts, identities and connecting; `ui.icons`; `ui.widget` the shared Swing bits (`Dialogs`, `Edt`, `FindBar`, `FormPanel`, …). What another package uses became public (~200 declarations); nothing else changed. The app icons moved to `ui/icons` with `Icons` |
| 13 | `ClientEntry`/`ChannelNode` are bags of public volatile fields; a reader can see a half-applied update | open | | 13 | `ClientEntry`/`ChannelNode` are bags of public volatile fields; a reader can see a half-applied update | deferred: each field is `volatile`, so a reader sees only a moment's mix of old and new on a multi-field read, which the next update repaints; it has caused no bug. If one does, a `ServerModel` lock around each event's properties and the few multi-field readers (tree snapshot and renderer, info, details) fixes it without touching the ~1,000 field accesses |
| 14 | Core produces English UI copy (status lines, log lines) | open | | 14 | Core produces English UI copy (status lines, log lines) | deferred until the app is translated: both frontends show the same English, so core keeps it written once; the chat log lines are TS3's own and go to disk from core regardless. Translating would start with status lines and error prefixes as structured events, and `SelfState`/`HotkeyAction` labels in each frontend's string resources |