Move the chat log and announcements out of TeamspeakConnection
ChatLog opens the on-disk log once the server is known, hands frontends the server and channel history, and saves sent and received messages and the server tab's log lines; with logging off, everything still reaches the app unsaved. Announcer tells the user what happened as TeamSpeak does: the server-tab line with linked channels and clients, the sound pack's sound with its name variables, and errors with the matching "insufficient permissions" or "error" sound. ConnectionEventHandler uses both directly instead of nine helpers on the connection, which no longer holds the sound notifier. The connection's public API is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,8 +10,12 @@ 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` |
|
||||
| 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: `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 | open |
|
||||
| 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: |
|
||||
| 4a | … chat log and what we tell the user (log lines, sounds, links and sound variables) | done (`c28c2ce`): `ChatLog`, `Announcer` |
|
||||
| 4b | … request plumbing into its own class; `*Admin` helpers on narrow dependencies instead of the whole connection | open |
|
||||
| 4c | … frontends reach the admin helpers directly instead of ~40 one-line forwarders | open |
|
||||
| 4d | … our own state (mic, speakers, away, talk request, recording) out of the connection | open |
|
||||
| 5 | Two front doors: frontends use both `ServerSession` and `session.connection()` with no rule for which | open |
|
||||
| 6 | Menu bar, toolbar and hotkeys each implement the same commands: `MainMenuBar.Listener` (~50 methods, ~210 lines of forwarding in `MainFrame`), `MainToolbar.Listener`, `HotkeyActions` | open |
|
||||
| 7 | The admin list dialogs (bans, complaints, offline messages, privilege keys, server log) repeat the load/status/table-model scaffolding | open |
|
||||
|
||||
Reference in New Issue
Block a user