Files

16 lines
4.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Octo-style saved-account login (#53 / Y)
`compat/glue/remember_password.lua` replaces O's two checkboxes with a right-side saved-account list. It uses the stock `GlueButtonBigTemplate` and `AccountLoginBackdropTemplate`, not the missing UI-CheckBox textures. There are up to 16 ordered accounts, eight per page. Each row has a login button, label editor, reorder controls and Remove. Lock disables account edits; Streamer mode masks list names/labels and the normal account entry field. Lock is an editing control, not an encryption password.
Clicking a saved account fills the normal login fields and calls `AccountLogin_Login`, preserving M's priority gate. After the character list loads, the saved character name is resolved through `CharacterSelectListUtil` into the current displayed index. A missing named character stops at selection; it never enters a different character merely because indices shifted. On first use/migration, with no stored character, the server-selected character is used (or the first valid row). Entry calls the stock `CharacterSelect_EnterWorld`, preserving lock and confirmation checks. The normal Log In button and edit-box Enter gestures clear auto-entry intent and stop at character select. Disconnect, login-screen return and a 120-second intent expiry prevent stale automatic entry. `CharacterSelect_EnterWorld` is hooked to record the account's last character name/index. No CharacterSelect source replacement is needed.
Normal submitted logins save/update the typed account unless the list is locked. Save typed account is also explicit. A full list or store failure shows a message and lets normal login continue. Label, order, deletion, Lock and Streamer preferences persist. Removing the final account preserves view preferences. The old single-account GWC1 format migrates in memory; its automatic flag is deliberately not used to start login without a click.
Wire uses the existing per-profile files: executable-directory `WTF/remember-octo.dat` for profile 2 and `remember-local.dat` for profile 5. The GWC2 payload contains count/flags, then length-delimited account/password/label/character strings and a 16-bit character index. Bounds: 16 accounts, 32 account bytes, 64 password/label/character bytes, index 0..1000, total <=4096 bytes. Duplicate account names are rejected case-insensitively. Windows persists only user-DPAPI ciphertext via atomic replacement. The Linux host helper uses owner-only 0600 files; it does not claim Linux DPAPI encryption. Passwords are never written to CVars, SavedVariables, logs or addon tables. Lua credentials remain in a private closure and ordinary masked login field; the list is released when login hides.
Queries 16–21 now transfer the whole versioned vault in bounded three-byte scalar chunks: 16 starts a read (0 absent, -1 error, otherwise length); 17 reads sequential offsets; 18 begins a write with row=length, chunk=2; 19 appends a chunk at the exact offset; 20 validates and atomically commits; 21 clears. Invalid/incomplete transfers discard staging and preserve the old file. Deploy **Wire natives and glue together** because the scalar payload contract changed. Existing Bridge forwarding exports suffice; no codec change.
Apply `ops.remember_password_glue.prepare(bytes)` to AccountLogin FDID 5612756. It injects into a pristine file or replaces the old installed O closure in place; repeated application is idempotent. It keeps the surrounding priority gate unchanged. The prepared handoff artifact is `runtime/continuation-20261113/claude-lane/y-autologin-octo/AccountLogin.lua`, composed with M. M's closure was checked byte-for-byte unchanged (SHA-256 `2b7e77a2aad8f0621e116f63d85842104022f9140ced23c2abca016300664516`).
Validation: build only `remember-credentials-tests` and run `tests/remember_password_test.py <host-binary> [prepared-AccountLogin.lua]` (CTest name `remember-password`). The composite covers 16-account round trips, GWC1 migration, metadata/order/removal, empty-list preferences, bad/chunked writes, file permissions, and the actual glue closure in a fake stock UI with changed character ordering, normal vs saved login, delayed priority gate, disconnect, lock, streamer, labels and first-use fallback. The full prepared glue parses with Lua 5.1. DPAPI runtime behavior, visual layout, and live auto-entry remain Claude's LOCAL validation. No natives/content were built, signed or installed here.