Commit Graph
6 Commits
Author SHA1 Message Date
selikhovandClaude Opus 5.5 4cb6c6b527 Merge the identity defaults: one default, one identities page
The development branch's identity work and this wave's Profiles page
were two models of the same thing: the store's default identity (schema
4: where each identity came from and which one is the default, which the
import on start relies on to replace Voelin's own identity once) next to
this wave's identity.default setting, and a separate Identities section
next to Profiles. They are one now.

- The store's default is the only default: the identity.default setting
  is gone (never released, so nothing to migrate). Choosing an identity
  calls Store::set_default_identity as the user's choice, which no
  import replaces, and says it applies from the next connection.
- One place picks the identity of a connection: the bookmark's own if it
  names one that exists, else the store's default. Connecting, My
  Account and each identity's "Used by" all go through it.
- Profiles has what Identities had: each identity's origin ("Made in
  Voelin", "Imported", "Chosen by you") with its level, the Default
  badge or "Use as default", and the switch for importing the official
  clients' identities on start, next to this wave's rename, export,
  delete, security level, import by hand and identity per server. The
  Identities section, its sidebar entry and the phone's sixth tab are
  gone; VOELIN_OPEN=settings:identities opens Profiles.
- docs/identity.md and docs/ui.md say so; the Identities screenshot gives
  way to the Profiles one, taken from a store with the created identity
  and a synthetic TeamSpeak one.

Checked headless with a fake home and synthetic identities only: the
first start creates Default; the second, with a synthetic TeamSpeak 6
database, makes its identity the default once and says so; the third
changes nothing, and My Account shows the store's default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 09:56:25 +03:00
selikhovandClaude Opus 5.5 c551378729 Settings → Identities: see and choose the identity servers see
With the official client's identity taking the place of the one Voelin
made, the user needs to see which identity is in use and switch either
way. Settings has an Identities section now (a sixth tab, ID, on the
phone): every stored identity with where it came from, its security
level and unique id, "Default" on the one servers see and "Use as
default" on the others. A choice applies from the next connection,
says so in the status, and is the user's: no import replaces it (the
store marks a created identity chosen this way as the user's). The
section also has the switch for importing the official clients'
identities on start (identity.import_from_teamspeak).

The rows are a pure function with a test; screenshots, headless, of a
store with the created identity and two synthetic TeamSpeak ones.
docs/identity.md describes the one-time replacement and the section;
VOELIN_OPEN=settings:identities opens it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 04:43:02 +03:00
selikhovandClaude Opus 5.5 3daccb7fd6 Import the official client's identities on every start
Switching clients should not mean a new unique id. On every start the app
now does what `voelinctl identity import --auto` does: identities in the
official TeamSpeak 3/6 clients' databases that Voelin does not have yet
are added, the files opened read-only and immutable as before. The
identity the official client uses by default (field 5 of its payload, now
read into `Found::selected`) goes in first, so when Voelin has no identity
of its own yet, that one becomes Voelin's default and servers see the same
unique id; an existing default stays.

What was imported is shown once in the status line (the toast on
desktop), by nickname. The runtime setting
identity.import_from_teamspeak (default on) turns it off; the sample data
of VOELIN_DEMO_UI never imports. The settings are now opened before the
identity is chosen. Tested with synthetic databases only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 23:18:19 +03:00
faumarayandClaude Opus 5 4b26832bcf Say in docs/identity.md what import actually does and does not
The format description was written before the code; bring it in line with what
shipped, and be explicit about the two costs a reader would otherwise discover
the hard way: `immutable` means an identity the running client has not yet
checkpointed is not seen, and the Qt secrets file path is best-effort because
no such file existed to develop against.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-29 18:35:08 +03:00
faumarayandClaude Opus 5 90f234cff4 Import identities from the official clients
Switching to Voelin should not mean starting over on every server: the unique
id is the key pair, and a user who cannot bring it along loses every server
group they have. So read the forms the official clients keep it in — the
TeamSpeak 3 `.ini` export, the `ProtobufItems` items both clients write, and
the older `Identities/<n>/…` rows — and store them through voelin-store,
skipping unique ids the store already has instead of adding a second copy.

Export back to the `.ini` form in the same module: an importer without an
exporter traps people here, which is the thing being fixed.

The clients' databases hold private keys and may be open in a running client,
so they are opened read-only and `immutable`: no lock, no shared-memory file,
no write-ahead log replay, nothing of the user's changed to read it. The cost
is that an identity written but not yet checkpointed is not seen, which is the
right way round.

Three field numbers do not earn a protobuf dependency; the wire reader is
twenty lines and skips what it does not understand. An item is taken as an
identity only when its declared type says so, never because a field number
happens to match.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-29 13:44:41 +03:00
faumarayandClaude Opus 5 840d9ce366 Describe where TeamSpeak keeps identities
Both official clients store identities in a `ProtobufItems` table of their
`settings.db`, not in the settings rows: one protobuf item per object, the item
type in field 6 selecting which payload field carries the body, and type 1
(field 17) holding the TeamSpeak 3 export string plus a nickname. Working that
out is the prerequisite for importing, so write it down before the code.

The myTeamSpeak account record sits in the same database and is easy to mistake
for an identity store; note that it carries no key pair and that the account
service stays out of scope, so the question is not reopened.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-29 13:36:40 +03:00