Repository navigation
sync: merge upstream 3248dc073e into fork main - #405
Conversation
…distinguishable (coder#32466) Each unread inbox notification's "Mark as read" button now gets `aria-describedby` pointing at the notification content, the same way the action links do since coder#32317. Screen reader users can now tell which notification each button marks. The label also changes to sentence case to match "Mark all as read". The sr-only "Unread" text used to sit inside the dot, which is `display: none` on hover and focus-within. Screen readers lost the unread state while a user was in the item. The text is now a sibling of the dot. The button was already keyboard reachable on main (coder#31656), so this was the part of DEQ-610 still open. Closes DEQ-610 Closes DEQ-633 | Ticket | UI surface | | --- | --- | | [DEQ-610](https://linear.app/codercom/issue/DEQ-610) | Navbar bell > Inbox popover, unread item "Unread" indicator (screen reader only, no visual change) | | [DEQ-633](https://linear.app/codercom/issue/DEQ-633) | Navbar bell > Inbox popover, unread item "Mark as read" button ([screenshots](https://linear.app/codercom/issue/DEQ-633#comment-dcc113c9)) | <details> <summary>Grouping and decision log</summary> - Both tickets cover the same element in `InboxItem.tsx`, so they ship in one PR. - DEQ-610's keyboard reachability (`not-group-hover:not-group-focus-within:sr-only`) is already on main from coder#31656. Verified in Storybook (`InboxItem` / `UnreadFocused`): on main, `Unread` has no layout box while the item has focus; on this branch it stays in the accessibility tree. - DEQ-633 reuses `aria-describedby={contentId}` from coder#32317 and keeps "Mark as read" as the name. Every button has the same name, and the description tells them apart. - Self-review (frontend-review, frontend-deep-review, frontend-accessibility): the only should-fix was a test whose keyboard assertions can't fail in jsdom. I cut it down to the accessible-description assertion. No findings were dropped. </details> 🤖 Generated by Coder Agents on behalf of @aqandrew.
coder#32283) CORE-784: Generate unique passwords for development environments Replace the shared, publicly documented default password with randomly generated credentials for admin and member users across `scripts/develop.sh`, Docker Compose, and ephemeral deployments. - Generate separate 32-character passwords, stored in permission-restricted files (`0600`) and reused across restarts and database resets. - Automatically replace legacy default passwords on existing instances without overwriting passwords changed manually. - Reject the old default as an override. Limit `--password` and `CODER_DEV_ADMIN_PASSWORD` to the admin user and persist successful overrides. - Improve login banners, password recovery errors, and Compose bootstrap token recovery. - Update ephemeral deployment tooling and documentation to use stored credentials instead of hardcoded passwords. - Add Go tests covering password generation, migration, persistence, overrides, and error handling. **Validation:** Go tests, linting, and shell checks pass. All 20 original manual scenarios passed, although several were run before subsequent changes. Additional unit, stub, and integration tests cover the updated behavior; some final Compose changes have not been retested against a live environment. Refs CORE-784
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52669211c3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if [ -n "${CODER_DEV_MEMBER_PASSWORD:-}" ]; then | ||
| PASSWORD="$CODER_DEV_MEMBER_PASSWORD" | ||
| elif [ -s "$MEMBER_PASSWORD_FILE" ]; then | ||
| PASSWORD="$(cat "$MEMBER_PASSWORD_FILE")" |
There was a problem hiding this comment.
Persist the member password override
When a fresh Compose environment starts with CODER_DEV_MEMBER_PASSWORD set, setup-init.sh has already generated a different /bootstrap/member-password, while this branch creates the member with the override without updating that file. After a normal restart without the environment variable, the script reads and advertises the generated value even though the account still accepts only the override, so the new persisted-password contract leaves developers with unusable credentials. Store the override after successful creation or avoid generating a conflicting file.
Useful? React with 👍 / 👎.
| } else { | ||
| cfg.adminLogin = cfg.knownLogin(ctx, logger, "[email protected]", adminPath, cfg.password) |
There was a problem hiding this comment.
Validate overrides despite an existing session
When .coderv2/session is still valid and --password is supplied, this branch calls knownLogin, which merely puts the unverified override in the banner and never persists it. Thus the newly added recovery instruction to run once with the current password does not work in this common state: even an incorrect value appears as the login, and after the session expires a later run still fails because admin-password was never written. Verify and store the override even when session authentication succeeds.
Useful? React with 👍 / 👎.
| if _, err := client.User(ctx, "member"); err != nil { | ||
| _, err = client.CreateUserWithOrgs(ctx, codersdk.CreateUserRequestWithOrgs{ | ||
| Email: "[email protected]", | ||
| Username: "member", | ||
| Name: "Regular User", | ||
| Password: cfg.password, | ||
| UserLoginType: codersdk.LoginTypePassword, | ||
| OrganizationIDs: []uuid.UUID{defaultOrg.ID}, | ||
| }) | ||
| memberPassword, err := loadOrCreatePassword(memberPath) |
There was a problem hiding this comment.
Avoid persisting passwords after inconclusive member lookup
If the member lookup fails for any reason other than not-found, such as a transient 500 or network error for an existing member, this branch immediately creates a durable password file before attempting user creation. When creation then fails because the user already exists, that unused file remains; subsequent runs read and print it even though the existing account never received that password. Distinguish not-found before generating credentials, or remove a newly created file when creation fails.
Useful? React with 👍 / 👎.
| else | ||
| echo "Member password file $MEMBER_PASSWORD_FILE is missing or empty." >&2 | ||
| exit 1 |
There was a problem hiding this comment.
Regenerate credentials when the member is absent
When an existing Compose database has an admin but no member, as after an older initialization was interrupted between setup-init and setup-users, the retry path generates a candidate member password and then removes it after the password-update endpoint returns 404. This branch subsequently exits because the file is missing instead of creating the absent member, so every later Compose start fails at the same point. Check whether the member exists and generate a new stored password when it does not.
Useful? React with 👍 / 👎.
| if !stored { | ||
| // A generated password that the server did not accept would be | ||
| // shown in the banner and tried at the next sign-in. | ||
| if rmErr := os.Remove(path); rmErr != nil { | ||
| return false, xerrors.Errorf("remove unused password file %s: %w", path, rmErr) |
There was a problem hiding this comment.
Retain generated passwords after ambiguous update errors
When UpdateUserPassword returns a transport error after the server commits the password change but before the client receives the 204 response, this cleanup deletes the only copy of the generated password. The server transaction also revokes the user's API keys before sending the response, so for the admin this leaves neither a valid saved session nor a known password and forces a destructive database reset. Remove the file only after a definitive rejection proves that the new password was not accepted.
Useful? React with 👍 / 👎.
| default: | ||
| password, err = loadOrCreatePassword(adminPath) |
There was a problem hiding this comment.
Rotate stored legacy passwords when recreating users
When --db-reset starts with an admin-password or member-password file containing the legacy public default, the database is wiped but the files remain, and this fresh-user branch reuses their contents unchanged. The newly created accounts therefore accept SomeSecurePassword! for the entire first run, bypassing the new flag validation and defeating the security purpose of this change until a later restart rotates them. Delete or rotate the legacy value before creating users in a fresh database.
Useful? React with 👍 / 👎.
Summary
Routine upstream sync. Merges upstream main through 3248dc0 (fix: generate per-instance dev passwords and remove the shared default, 2026-11-19T23:55:06Z) into fork main c7dfa9d.
Upstream content in this merge (5 commits >= 24h old at sync time):
Clean merge, 24 files, no conflicts, no new migrations (no chatdmig routing needed). Silent-loss greps clean: registerForkChatRoutes, forkOpenAICompatReasoningEffort, SubagentBody, forkdb queued/wakeup queries all intact.
Validation