feat(personal): cut Mode 3 over to the collab auth + files contract#102
Merged
Conversation
Repoint PersonalFileSource, AuthClient, and the personal-auth UI from the
legacy Go gateway to the collab server (CasualOffice/collab):
- wire.ts: UserWire {id,username,isAdmin,createdAt}, FileSummaryWire
{id,name,etag,createdAt,modifiedAt}, ErrorWire {error}, ProfileWire
{displayName,email,timezone,hasAvatar,preferences}.
- PersonalFileSource: unwrap { files }/{ file }/{ profile }; multipart
POST /files create; POST /files/:id replace with If-Match; PATCH
{ name } rename (204); PATCH /auth/profile; decode CD filename.
- AuthClient: username login/signup, { user } unwrap, 503 -> null,
PATCH profile, { error } envelope.
- select.ts: unwrap { user } from /auth/me.
- PersonalAuthGate: email field -> username; drop signup displayName;
collab error-code copy. ProfileSettingsDialog: locale <-> preferences.
UserMenu: username identity + @handle secondary line.
- Tests + e2e (personal-auth-gate, autosave-indicator) updated to the
collab contract.
Authentication is now by username (collab has no email login).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Repoints Mode 3 (Personal / Standalone) from the legacy Go gateway to the collab server's auth + files contract (CasualOffice/collab
src/auth/*+src/files/*) — the Sheets-proven shapes. This is the second half of the Go→collab editor cutover (WOPI shipped in #100).Contract changes
{ user },{ files },{ file },{ profile }(were bare); errors are{ error }(were{ code, message }).id/name/etag/modifiedAt(weredocId/fileName/version/savedAt).POST /filescreate;POST /files/:idreplace withIf-Match(wasPUT /files/:id/contents);PATCH { name }rename → 204.PATCH /auth/profile(was PUT);{ user, profile }read shape; language preference moves intopreferences.locale(collab has nolocalecolumn).User-visible change
Authentication is now by username, not email — collab authenticates by username (email is an optional profile field). The login/signup modal now shows a Username field;
AuthCredentialsis{ username, password }andPersonalFileSourceOptions.useris{ id, username }.Verification
typecheck, format, lint (0 errors), build, 58 file-source unit tests, and the
personal-auth-gate(13) +autosave-indicator(3) e2e specs all pass locally. Login modal visually confirmed (Username field). Grounded in collab source, not memory.Remaining for the cutover: PR2 (prod Dockerfile + compose → collab) and PR3 (delete
backend/+ CI Go job).