mirror of
https://github.com/coder/coder.git
synced 2026-11-28 16:58:22 +08:00
5ccbef037bc9fba3d29c8682bb669abed32f3327
17207
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
5ccbef037b |
refactor(coderd/x/chatd): remove the no-op allowedBehaviorToolNames filter (#30864)
Removes `allowedBehaviorToolNames`, `allToolNames`, and `TestAllowedBehaviorToolNames`, and the active-name check they fed in `appendDynamicTools`. The check never skipped a tool. `appendDynamicTools` returns early for Explore mode and plan mode, so at the check, `allowedBehaviorToolNames` always returned every tool name. A dynamic tool that shares a built-in tool's name is still dropped with a warning. Validation: `go test ./coderd/x/chatd/ -run 'Dynamic|AllowedExplore|StopAfterPlan'` passes, and the pre-commit hook (build, `lint/go`, `lint/go/new-code`) passed. ## Stack This stack splits #28757, as requested in review. It moves the code that prepares a chat turn into one file, `turn_environment.go`, and moves the tool policy tests from full turns to a table test. chatd behaves as on `main`, except for the debug log in #30865. 1. #30864 Remove the no-op `allowedBehaviorToolNames` filter 2. #30865 Log workspace agent lookup errors in turn preparation 3. #30866 Rename `prepareGeneration` to `buildTurnEnvironment` 4. #30867 Cover the turn tool policy at `buildTurnEnvironment` 5. #30868 Remove seven end-to-end tool policy tests 6. #30869 Name the `*Server` receiver `p` in `turn_environment.go` 7. #30870 Move the turn preparation helpers into `turn_environment.go` > Xum, an AI agent, opened this PR for @ibetitsmike and wrote this description. |
||
|
|
939146b077 |
fix(coderd/x/chatd): reset stream history only if after_id is deleted (#29808)
Fixes [CODAGT-1175](https://linear.app/codercom/issue/CODAGT-1175/prevent-chat-stream-resets-from-loading-full-history) **tl;dr:** The chat stream no longer sends the full history on every connect when a chat contains old edit tombstones. On its first sync, the chat stream WebSocket treated any soft-deleted message (edits create them) as a history reset and sent `history_reset` plus every message, ignoring `after_id`. The client replaced its paginated cache with that history, so every connect, reconnect and PWA resume of a long chat that had ever been edited rendered the whole transcript. A dogfood chat of about 3.2k messages sent 7.1 MB per connect. `historyResetRequired` in `stream_loop.go` now resets on the first sync with an `after_id` only if message `after_id` is missing or deleted. Messages are only deleted as a suffix of the chat (an edit deletes the edited message and every later one), so while that message is live the client holds none of the deleted rows. Otherwise the stream sends only live messages newer than `after_id`, and `messageEvents` never sends tombstones as messages. Deletions after the first sync still reset. `stream_loop_internal_test.go` covers the initial-sync cases and the deletion of a streamed message after the first sync, `TestSubscribeAfterMessageIDWithEdit` runs a real `EditMessage` against the database, and `ARCHITECTURE.md` gets TODOs for the new rule. > Generated by Coder Agents on behalf of @jscottmiller. |
||
|
|
07f3d952e0 | docs(docs/README): reformat to one sentence per line (#30697) | ||
|
|
93205d98bc | feat: add JSON output to coder ai-gateway keys create (#30139) | ||
|
|
c4d983420d |
docs(docs/admin/templates): reformat to one sentence per line (#30699)
Reformats the template docs under `docs/admin/templates` to one sentence per line, as the [docs style guide](https://github.com/coder/coder/blob/main/docs/.style/style-guide/formatting.md#one-sentence-per-line) requires. Hard-wrapped paragraphs are unwrapped and lines holding several sentences are split, so a later edit to one sentence shows up as a one-line diff. Apart from the exception below, only whitespace inside paragraphs and list items changes, and the rendered pages are the same. Comparing the changed files against `main` word for word, ignoring whitespace and blockquote `>` markers, finds differences only on the reworded lines. `git diff --word-diff` is easier to read than the line diff. 4 lines that already contained an em or en dash were reworded by hand, because `lint/emdash` treats every reflowed line as newly added. Each uses a parenthetical, a separate sentence, or a colon after a lead-in. Dashes on lines the reflow did not touch are left alone. Applied with an in-progress formatter, limited to pages listed in `docs/manifest.json` and excluding generated reference docs. This is one of a batch of PRs that split the docs by area (38 files changed, 934 insertions(+), 1556 deletions(-)). --- 🤖 Built with AI assistance. |
||
|
|
54274c18e0 |
feat: report skipped and canceled script outcomes from the agent (#30888)
feat(agent): report skipped and canceled script outcomes Send startup-script outcomes to coderd and the Build Timeline, completing the agent-side support for #30875. - Report one zero-duration timing for scripts skipped or canceled before starting. Interrupted startup scripts report `canceled` instead of `exit_failure`, including on templates without ordering. - Add cancellation logs for ordered scripts waiting on dependencies or running. Completed outcomes, timeouts, exit codes, and stop/cron reporting remain unchanged. - Give reports an independent timeout and make `Runner.Close` wait for in-flight executions so shutdown does not discard cancellation timings. Synchronize cron startup with `Close` to prevent shutdown hangs. - Dial Agent API v2.15; agents now require coderd supporting that version. Tests cover skips, cancellation, duplicate prevention, and shutdown races. Race-detector tests and all 14 manual scenarios passed. Refs https://linear.app/codercom/issue/PLAT-550/phase-3-expose-skipped-and-canceled-script-outcomes |
||
|
|
e637c9203e | fix: match chart accessible name in story (#30907) | ||
|
|
764e67bcff |
feat: expose skipped and canceled script outcomes in coderd and the Build Timeline (#30875)
feat: expose skipped and canceled script outcomes Add `skipped` and `canceled` statuses across the Agent API, database, SDK, and Build Timeline for startup scripts. - Store and return both outcomes, preserving zero-duration timings, and reject unknown statuses. Rollbacks rewrite the new outcomes to `exit_failure` with exit code 255. - Add typed legends, outcome-specific tooltips, and keyboard-accessible bars. Fix timeline crashes for `timed_out` and `pipes_left_open`. - Bump the Agent API to v2.15 while agents continue using v2.14. Add API, migration, and Storybook coverage. First of two PRs for PLAT-550. Agents do not emit the new statuses yet; a follow-up after #30765 enables reporting. Shutdown scripts remain outside the timeline, and agent health and badge rules are unchanged. Refs: https://linear.app/codercom/issue/PLAT-550/phase-3-expose-skipped-and-canceled-script-outcomes |
||
|
|
b477ada408 |
docs: add Pethost to community install methods (#30901)
Adds Pethost to the table of community install methods, linking its
one-click Coder template.
The template runs the official image (`ghcr.io/coder/coder:v2.37.4`)
with PostgreSQL 17. It asks for an email and a password and creates the
owner with them at the first start, before the server answers on its
public address, so the first visitor cannot claim the deployment.
`CODER_ACCESS_URL` is set to the project's HTTPS address.
AI disclosure: the template and this change were prepared with an AI
coding agent; I verified them myself on a test machine.
Verification:
```
$ node try.mjs coder
{"id":"coder","ok":true,"seconds":68,"page":200,
"probe":{"first":200,"admin":201,"other":401},
"afterRestart":{"page":200,"probe":{"first":200,"admin":201,"other":401}},
"services":[{"name":"coder","state":"SERVICE_STATE_RUNNING","memoryMb":302},
{"name":"database","state":"SERVICE_STATE_HEALTHY","memoryMb":44}]}
```
(`/api/v2/users/first` is 200, the owner's login returns 201, a wrong
password 401, also after a restart.)
A template was pushed and a workspace created from it:
```
$ coder templates init --id scratch s2 && tar -cf - -C s2 . | coder templates push scratch -d - --yes
Updated version at Oct 15 14:39:23!
$ coder create demo --template scratch --yes
The demo workspace has been created at Oct 15 14:39:28!
$ coder list
WORKSPACE TEMPLATE STATUS HEALTHY LAST BUILT CURRENT VERSION OUTDATED
admin/demo scratch Started true <1m wrong_powell86 false
```
|
||
|
|
5bde0ea6ab |
fix(flake): update Linux Chrome download (#30899)
The Linux development shell downloads Chrome 143.0.7499.169 from a Google URL that now returns HTTP 404, preventing `nix develop` from realizing the environment. Override Linux Chrome to 155.0.8059.84 with its verified download hash, without updating the nixpkgs inputs. Remove the pinned recipe's ANGLE-library patch step because this Chrome release no longer bundles those libraries. Darwin Chrome and the existing aarch64-linux exclusion are unchanged. Verified the complete x86_64-linux development shell and a headless browser smoke test using Nix 2.35.3 in an isolated Docker container. Evaluated, but did not execute, the other three platforms. <details> <summary>Validation evidence</summary> ```text $ sha256sum google-chrome.deb 8fbd2ae69cdf7ee98b7513c3396a7b5e06f974f8625fdd590df3091dd0c3e9de google-chrome.deb $ nix develop --no-write-lock-file --max-jobs 2 --cores 2 --command true # Exit status: 0; full environment realized. $ nix develop --no-write-lock-file --command google-chrome-stable --version Google Chrome 155.0.8059.84 $ google-chrome-stable --headless --no-sandbox --disable-dev-shm-usage --disable-gpu --dump-dom about:blank <html><head></head><body></body></html> # Exit status: 0. --no-sandbox was used only for the root-run container smoke test. ``` Platform evaluation selected Chrome 155.0.8059.84 on x86_64-linux, no Chrome on aarch64-linux, and the existing Chrome 143.0.7499.170 on both Darwin platforms. Darwin evaluation retains existing SDK deprecation warnings. `git diff --check` passed. The new override matches the repository-pinned nixfmt output; pre-existing formatting elsewhere in the flake was left unchanged. </details> AI-assisted implementation and validation using Xum. The model identifier was not exposed to this session. |
||
|
|
c4cfe8a9ea |
docs: add missing rules from the docs style guide project (#30782)
## Summary Adds the style rules from the Docs style guide project (DOCS-1282) that `docs/.style/style-guide/` was missing, and fixes the guide's own self-violations and contradictions from the second ASD-STE100 audit (DOCS-1265). Each new Vale rule lands in its own PR based on this branch, so every footer for those rules reads `(planned)` here. ## Changes - **New rules:** spell out negative instructions (`do not`, not `don't`); leave out "please"; how to count words; full clauses instead of `-ing` clauses in steps; words that have one meaning (`ensure`, `should`, `may`, `since`); US spelling; noun stacks of three words or fewer; no periods in acronyms; inclusive LGBTQ terms; `grandfathered` in the inclusive substitutions, with a link to the history of the grandfather clause. - **Changed rules:** - The 20-word step budget becomes a firm limit for the whole step, counted per paragraph when a step deliberately breaks into more than one. - "Semicolons sparingly" becomes "No semicolons in prose", except in code and table cells. - Cross-references use "refer to" or "visit", not "see" or "check out". - The whose rule stops recommending "with". - Latin abbreviations: prefer the English forms of `e.g.`, `i.e.`, and `etc.` outside tables, and accept either form. - `IMPORTANT` callouts carry information, never actions. - Feature names use title case and instances use sentence case (AI Gateway versus your AI gateway). - Literal product text, such as error messages, goes in code spans instead of quotation marks. - **Vale doctrine:** `suggestion` rules can land with existing findings. Warning and error rules still ship clean. - **Self-violations:** title-case H1, navigational "see", "walkthrough", hard wraps, a British spelling, future-tense promises, the `tears down` idiom, gerund headings in `docs/.style/README.md`, semicolons in the DOC3 dash advice, and the numeric-range contradiction. - Coverage counts move from 79 to 87 rules, with 9 tool-checked and 33 planned. ## Testing - `go run ./scripts/styleclaims`: passes. - `markdownlint-cli2` and `markdown-table-formatter` on every changed file: pass. - `scripts/check_emdash.sh`: passes. - `vale` on the changed files that Vale lints (`docs/.style/README.md`, `content-guidelines.md`, `docs/AGENTS.md`): zero findings. - Repository `pre-commit-light` hook: passes. <details> <summary>Decision log</summary> ### Source The second ASD-STE100 audit compared the guide with ASD-STE100 Issue 9, and a catalog of the Linear project listed every rule missing from the guide. Nick reviewed each item and chose to add it, defer it, or edit only the guide. ### Decisions - All guide text goes in this PR. Each new Vale rule gets its own PR, based on this branch. - Vale rule PRs: `Coder.Please`, `Coder.AcronymPeriods` (a Coder copy of `Google.Periods` that also catches 2-letter acronyms), `Coder.InclusiveLanguage`, `Coder.LGBTQ`, `Coder.USSpelling`, `Coder.AmbiguousWords` (suggestion), `Coder.ImperativeNegation`, `Coder.StepLength`, `Coder.Semicolons`, `Coder.CheckOut`, `Coder.LatinAbbreviations` (suggestion). - Guide only, because Vale can't detect these: the "with" caution, `IMPORTANT` callouts, feature versus instance capitalization, and noun stacks. A part-of-speech prototype missed every test stack. - Deferred to the backlog: hand-written anchors (DOCS-1278; some are deliberate redirect targets), media captions (DOCS-1279 and DOCS-1286), the noun-stack Vale rule (DOCS-1284), the `-ing` Vale rule (DOCS-1287), and the product-name Vale rules (DOCS-1285 and DOCS-1288). - Imperative negation follows the sentence's mood: "Do not delete the production database" and "Coder won't push the new version" are both correct. - Word counting: a code span counts as one word. A bold UI label also counts as one word, which is an assumption for review. ### Open for review - Literal product text in code spans instead of quotation marks (`formatting.md` code-font list and the US-style quotation example). - Bold UI labels counting as one word. </details> --- *Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on behalf of @nickvigilante.* |
||
|
|
ff58693acb |
docs(docs/install/server): fix 404 OpenShift build config link (#30900)
## Summary
Fixes a 404 flagged by linkspector CI on
`docs/install/server/openshift.md`.
Red Hat retired `docs.openshift.com` and moved OpenShift Container
Platform docs to `docs.redhat.com`.
## Changes
- Replace the dead `docs.openshift.com` link with the equivalent page on
`docs.redhat.com` (verified 200 via `curl`).
## Testing
- `curl -sL -o /dev/null -w '%{http_code}'` against the new URL returns
200.
- `make pre-commit` (fmt/lint) passed locally.
Linear:
[DOCS-1313](https://linear.app/codercom/issue/DOCS-1313/fix-404-openshift-documentation-link-in-openshiftmd)
---
*This PR and its description were generated by Coder Agents on behalf of
@nickvigilante.*
|
||
|
|
e58424aad6 |
fix(site/src): add surface-scrollbar token for scrollbar thumbs (#30744)
Reported in https://codercom.slack.com/archives/C0B7YQ3M32B/p1791804820130739 Scrollbar thumbs used `--surface-invert-secondary`, which also drives the hover states of `Button`, `Checkbox` and `Switch`, plus the `Slider` handle and the theme swatch ring. That meant scrollbars couldn't be retuned without moving those too. This adds a dedicated `--surface-scrollbar` token, set to zinc-500 (`#71717A`) in both themes, and uses it for native scrollbars (global `scrollbar-color`), the `ScrollArea` thumb and the workspace terminal thumb. Other users of `--surface-invert-secondary` are unchanged. | Theme | Before | After | Contrast (primary / secondary) | |---|---|---|---| | Light | `#3F3F46` (10.44 / 9.50) | `#71717A` | 4.83 / 4.40, at least 3.27 on every light surface | | Dark | `#A1A1AA` (7.76 / 6.91) | `#71717A` | 4.12 / 3.67, 3.08 on tertiary | Both pass WCAG 1.4.11 (3:1) on primary, secondary and tertiary surfaces. ### Before / after (`/deployment/observability`) <img width="700" alt="Scrollbar before and after, light and dark" src="https://raw.githubusercontent.com/coder/coder/assets/surface-scrollbar-token/surface-scrollbar-comparison.png" /> | | Before | After | |---|---|---| | Light | <img width="400" alt="Light before" src="https://raw.githubusercontent.com/coder/coder/assets/surface-scrollbar-token/before-light.png" /> | <img width="400" alt="Light after" src="https://raw.githubusercontent.com/coder/coder/assets/surface-scrollbar-token/after-light.png" /> | | Dark | <img width="400" alt="Dark before" src="https://raw.githubusercontent.com/coder/coder/assets/surface-scrollbar-token/before-dark.png" /> | <img width="400" alt="Dark after" src="https://raw.githubusercontent.com/coder/coder/assets/surface-scrollbar-token/after-dark.png" /> | <details> <summary>Decision log</summary> - **New token instead of changing `--surface-invert-secondary`.** Lightening that token in light theme (to zinc-600) also lightened the hover state of the primary button, checked checkbox and on-switch (rest-to-hover contrast went from 1.43:1 to 1.93:1). A scrollbar-only token avoids that. - **zinc-500 for both themes.** It's the lightest zinc tone that passes 3:1 on every light surface, and the darkest zinc tone that passes on dark primary, secondary and tertiary. zinc-600 fails in dark theme (2.57:1 on primary). The exact minimums (`#8C8C97` light, `#666670` dark) were rejected: almost no margin on secondary and they fail on tertiary. - **No existing token fit.** The neutral tokens jump from failing values (`#A1A1AA` in light, `#3F3F46` in dark) straight to values well above 3:1. zinc-500 is already used in the MUI theme palette (`site/src/theme/*/palette.ts`). - **Known gap.** In dark theme, zinc-500 is 2.16:1 on `--surface-quaternary` (`#3F3F46`). The previous value passed there. - **Screenshots:** "before" images were captured on the same dev server with `main`'s values reapplied through an injected style. </details> --- _Generated by Coder Agents on behalf of @chrifro._ |
||
|
|
4dfec5c966 |
fix(site): use shared radio for theme cards (#30833)
The theme cards on Settings > Appearance used a hidden native radio plus a hand-built indicator, so #30462 did not cover them. The indicator used `border-default` when unselected and `border-secondary` when selected, which fails WCAG 1.4.11: | | Before | After | |---|---|---| | Dark, unselected | `#27272A` on `#09090B`, 1.34:1 | `#71717A`, 4.12:1 | | Dark, selected | `#3F3F46`, 1.91:1 | `#71717A`, 4.12:1 | | Light, unselected | `#E4E4E7` on white, 1.27:1 | `#71717A`, 4.83:1 | | Light, selected | `#A1A1AA`, 2.56:1 | `#71717A`, 4.83:1 | The cards now use the shared `RadioGroup` and `RadioGroupItem`, so they get the same `border-control` rest and hover borders as the Terminal font radios. The whole card is still the click target, the blue ring still marks the selected card, and the card focus outline is unchanged. Values were measured from computed styles on the dev server. Fixes DEQ-285 ## Before and after Settings > Appearance, Theme mode "Single". Light default is selected in light mode, Dark default in dark mode. | | Before | After | |---|---|---| | Dark | <img width="420" src="https://raw.githubusercontent.com/coder/coder/assets/a11y-theme-card-radio-contrast/before-dark.png" /> | <img width="420" src="https://raw.githubusercontent.com/coder/coder/d486b79633c92c32fecb7457703a5db1e8e44a43/after-dark.png" /> | | Light | <img width="420" src="https://raw.githubusercontent.com/coder/coder/assets/a11y-theme-card-radio-contrast/before-light.png" /> | <img width="420" src="https://raw.githubusercontent.com/coder/coder/d486b79633c92c32fecb7457703a5db1e8e44a43/after-light.png" /> | <details> <summary>Decision log</summary> - **Shared component instead of restyling the custom indicator.** Keeps the theme cards in sync with every other radio, so future token changes apply here too. - **Keyboard behavior now matches the Terminal font radios.** With the native radio, Arrow keys moved focus and immediately switched (and saved) the theme. With the shared `RadioGroup`, Arrow keys move focus and Space selects, which is how the Terminal font radios on the same page already behave. Verified on the dev server: Tab focuses the selected card, Arrow moves focus, Space selects and saves. - **Accessible names are unchanged.** Each radio is labelled by its card (`htmlFor`/`id`, the same pattern as the Terminal font radios), and the group is a `radiogroup` named "Theme". The existing AppearanceForm stories that select themes by role and name pass. - **Group role changes from `group` to `radiogroup`.** The old `<fieldset>` exposed `group`; the shared component exposes `radiogroup`, which is the correct role for a set of radios. The e2e test `adjust user theme preference` queried the old role, so its locator is updated. - The Terminal font radios in the same ticket were fixed by #30462, so this closes DEQ-285. </details> --- _Generated by Coder Agents on behalf of @chrifro._ |
||
|
|
bef7ba8023 |
fix(site): increase Switch off-state contrast to meet WCAG 1.4.11 (#30547)
The unchecked `Switch` track and its hover state did not reach the 3:1 non-text contrast required by WCAG 1.4.11 against the page or the thumb in either theme (1.18:1 to 1.91:1 in dark, 1.15:1 to 1.48:1 in light). This adds a `surface-control` token for the unchecked track (dark: zinc-500 `#71717A`; light: `240 5% 57%` `#8C8C97`, the lightest zinc-hue grey that keeps 3:1 against `surface-secondary`, so unchecked tracks stay easy to tell apart from checked ones), and uses the existing `surface-invert-secondary` for unchecked hover, matching checked hover. Checked and disabled states are unchanged, and `surface-quaternary` keeps its value, so nothing else in the app changes. Fixes DEQ-406, DEQ-358, DEQ-391, DEQ-55 | State | Theme | Before | After | |---|---|---|---| | Off, rest | Dark | <img width="415" alt="before dark rest" src="https://raw.githubusercontent.com/coder/coder/assets/a11y-switch-off-contrast/pr2/before-dark-rest.png" /> | <img width="415" alt="after dark rest" src="https://raw.githubusercontent.com/coder/coder/assets/a11y-switch-off-contrast/pr2/after-dark-rest.png" /> | | Off, hover | Dark | <img width="415" alt="before dark hover" src="https://raw.githubusercontent.com/coder/coder/assets/a11y-switch-off-contrast/pr2/before-dark-hover.png" /> | <img width="415" alt="after dark hover" src="https://raw.githubusercontent.com/coder/coder/assets/a11y-switch-off-contrast/pr2/after-dark-hover.png" /> | | Off, rest | Light | <img width="415" alt="before light rest" src="https://raw.githubusercontent.com/coder/coder/assets/a11y-switch-off-contrast/pr2/before-light-rest.png" /> | <img width="415" alt="after light rest" src="https://raw.githubusercontent.com/coder/coder/assets/a11y-switch-off-contrast/pr2/after-light-rest.png" /> | | Off, hover | Light | <img width="415" alt="before light hover" src="https://raw.githubusercontent.com/coder/coder/assets/a11y-switch-off-contrast/pr2/before-light-hover.png" /> | <img width="415" alt="after light hover" src="https://raw.githubusercontent.com/coder/coder/assets/a11y-switch-off-contrast/pr2/after-light-hover.png" /> | Screenshots are from `/settings/notifications` in the running app. <details> <summary>Contrast measurements and decision log</summary> Computed colors measured in the browser on `/settings/notifications` and on the template builder (`step=module-settings`, `#mod-vscode-desktop-open_recent`), identical on both: | State | Theme | Track / thumb / behind | Track vs behind | Thumb vs track | |---|---|---|---|---| | Off, rest | Dark | `#71717A` / `#09090B` / `#18181B` | 3.67:1 (was 1.70) | 4.12:1 (was 1.91) | | Off, hover | Dark | `#A1A1AA` / `#09090B` / `#18181B` | 6.91:1 (was 1.18) | 7.76:1 (was 1.33) | | Off, rest | Light | `#8C8C97` / `#FFFFFF` / `#F4F4F5` | 3.03:1 (was 1.34) | 3.33:1 (was 1.48) | | Off, hover | Light | `#3F3F46` / `#FFFFFF` / `#F4F4F5` | 9.50:1 (was 1.15) | 10.44:1 (was 1.27) | In light theme the unchecked track (`#8C8C97`) is 4.48:1 against the checked track (`#27272A`); with zinc-500 it was only 3.08:1, which made on and off hard to scan. Alternatives considered: - Change `surface-quaternary` globally to zinc-600 (dark) / zinc-400 (light): still under 3:1 for the switch (about 2.3 to 2.6:1), and drops the Template Insights progress bar fill below 3:1 against its track. - Use `surface-tertiary` for the off track: lowers contrast further and matches the disabled state. - Use `surface-invert-secondary` for the off track at rest: passes, but makes rest and hover identical. - zinc-500 in light theme: passes (4.40:1) but sits close to the checked track. zinc-400 fails (2.33:1). No zinc step exists between them, so light theme uses `240 5% 57%` (suggested in review); `240 4% 54%` (3.33:1) was considered for extra margin. - The value differs per theme and is role-based, so it gets its own token rather than reusing a decorative surface token. Frontend self-review (FE1 to FE10): pass. Existing `Switch` stories (`DefaultOff`, `SmallOff`, disabled variants) cover the changed visual states; there is no behavior change. </details> --- _Generated by Coder Agents on behalf of @chrifro._ --------- Co-authored-by: Andrew Aquino <dawneraq@gmail.com> |
||
|
|
899d25a5b1 | feat: add byte tracking to ssh and pty connections (#30389) | ||
|
|
c5bf97b463 |
feat(site): add Projects empty state and persist section collapse (#30741)
When a user has no projects, the Agents sidebar's Projects section now
shows a dashed empty-state box ("Group related chats together, with
shared members and history.") with a **New project** button, replacing
the "No projects yet" text. The box has no dismiss control.
The Projects section's collapsed state is now saved per user in
localStorage (`agents.sidebar.projects-collapsed.<user ID>`) and
restored on load. Collapsing the section hides the empty-state box. The
header's **+** button is hidden while the box is visible, so the section
never shows two New project buttons, and while an expanded section is
loading, so an empty result never unmounts a focused button. It shows
when the section is collapsed or projects exist.
| Empty state | Collapsed |
|---|---|
| 
| 
|
|
||
|
|
357e81b470 |
feat(coderd): list workspace secrets on workspace build audit entries (#30459)
Workspace build audit entries now list the build's secrets: name, env var, file path, and whether the request set the secret or it was carried forward from the previous build. Values are never included. Follows up on [this review thread](https://github.com/coder/coder/pull/30250#discussion_r4199276004). **Stack** (design decisions in #30248) 1. #30248 Database schema, queries, and RBAC 2. #30249 Encryption at rest 3. #30250 Set secrets on workspace builds 4. #30251 Deliver secrets to the agent 5. #30252 Docs 6. #30388 List a build's secrets 7. **#30459 Audit a build's secrets (this PR)** - Every workspace build audit entry includes its secrets, including builds that fail and orphaned deletes. - The entry lists the build's full set of secrets. Removed secrets show up only by being absent. - The three places that write build audit entries now share one helper instead of building the fields by hand. <details> <summary>Implementation details</summary> - `audit.AdditionalFields` gains `workspace_secrets`: `name`, `env_name`, `file_path`, and `source` (`request` or `carry_forward`) for each secret. - New `audit.WorkspaceBuildFields` is used for job success and failure in `provisionerdserver`, and for the orphan delete completed in `workspacebuilds.go`. - `source` comes from the `workspace_secrets.source` column (#30248), set by `persistSecrets` (#30250). </details> <details> <summary>Decision log</summary> (existing decision log, unchanged) </details> --- *Created by Coder Agents on behalf of @Emyrk.* |
||
|
|
6d34557d74 |
feat: add script ordering adoption telemetry (#30860)
Count `coder_script_order` declarations and literal `rule` blocks in coderd from the existing START plan in `CompletedJob.TemplateImport.Plan`, including child modules, without multiplying counts by resource or module instances. Persist these counts per template version on successful import after START plan graph validation, without changing the provisioner API. Report a deployment-wide `script_order_summary` with the number of templates using script ordering and total declaration and rule counts. Include only active, successfully imported versions of non-deleted templates so repeated imports do not inflate adoption. Elect one reporting replica per snapshot period and report explicit zeros when no templates use ordering. The summary contains only aggregate counts, without template identifiers or rule contents. Dynamic rule blocks are not counted because Terraform omits them from configuration JSON. Configuration-decoding failures are logged and skip updating the counts without independently failing the import. Script-order summary collection failures are logged and omit that summary while allowing the rest of the snapshot to proceed. Refs: https://linear.app/codercom/issue/PLAT-551 |
||
|
|
03cba25a63 |
feat: list a workspace build's secrets in coder secret list (#30388)
`coder secret list` now shows the current workspace build's secrets next to your user secrets, and which user secrets they replace. Part of [RELAY-7](https://linear.app/codercom/issue/RELAY-7/agent-relay-deliver-provider-credentials-via-coder-secrets-instead-of). **Stack** (design decisions in #30248) 1. #30248 Database schema, queries, and RBAC 2. #30249 Encryption at rest 3. #30250 Set secrets on workspace builds 4. #30251 Deliver secrets to the agent 5. #30252 Docs 6. **#30388 List a build's secrets (this PR)** 7. #30459 Audit a build's secrets - New `GET /workspacebuilds/{workspacebuild}/secrets` lists a build's secrets (metadata only, never values) and which user secret each one replaces. - Inside a workspace, `coder secret list` includes the current build's secrets. Outside a workspace, use `--workspace` or `--build-id`. - The agent now exposes `CODER_WORKSPACE_BUILD_ID`, so the CLI knows which build it is running in. - The agent manifest and the new endpoint use one shared resolver, so they always agree on which secret wins. - The user secret API is unchanged. <details> <summary>Implementation details</summary> - The manifest carries `workspace_build_id`; the agent sets it as `CODER_WORKSPACE_BUILD_ID`. - `coderd/workspacesecrets.Resolve(user, build, policy)` decides which secret is delivered on each env var and file. The manifest no longer relies on entry order. - `codersdk.WorkspaceSecret` embeds `UserSecret` and adds `workspace_build_id`, `ephemeral`, `cleared_at`, `env_replaces`, and `file_replaces`. Secrets whose values a later build cleared are still listed, with `cleared_at` set. - CLI columns: `source` and `replaced by` are shown by default only when a build is included; `ephemeral` is opt-in. The CLI makes two requests: user secrets, then build secrets. - Agents that predate the build ID fall back to `CODER_WORKSPACE_ID` and its latest build. </details> <details> <summary>Decision log</summary> (existing decision log, unchanged) </details> --- *Created by Coder Agents on behalf of @Emyrk.* |
||
|
|
3b283eb047 |
fix(site): preserve personal instructions drafts (#30626)
> 🤖 This PR was modified by Coder Agents on behalf of Jake Howell.
Prevent personal instructions drafts from being overwritten by delayed
query results. Block editing until instructions load, show initial-load
errors distinctly from empty prompts, and preserve dirty edits during
later query updates.
Reset successful saves from the server response and cache it before
refetching so a failed refresh cannot restore stale instructions.
Includes behavioral tests and loading, error, and empty Storybook
states.
Reproduction:
1. The user already has a nonempty saved personal-instructions prompt.
2. Open settings with the initial GET delayed.
3. Type a new draft into the enabled textarea.
4. The GET returns the existing saved prompt.
5. Formik replaces the draft with that prompt.
6. Further typing and Save submit the saved prompt plus subsequent
edits, losing the original draft.
<details>
<summary>Implementation decisions</summary>
- Keep Formik reinitialization for initial hydration and pristine
updates, guarded by the existing personal-model form draft pattern.
- Use the confirmed mutation response as the clean form baseline and
cache value.
- Leave the existing Saved-indicator behavior unchanged; no additional
retry UI.
</details>
|
||
|
|
5261723186 |
fix(site/src): replace role="application" on recharts charts (#30375)
> [!NOTE]
> This PR was generated by Coder Agents on behalf of @aqandrew.
Fixes DEQ-408 (axe `custom-role-application` on the user engagement
chart). Also fixes DEQ-342
recharts' `accessibilityLayer` sets `role="application"` on the chart
`<svg>` by default. This PR overrides it on all three charts that use it
(user engagement, template active users, license seat consumption) with
`role="group"` and `aria-roledescription="chart"`. It also gives each
chart an accessible name and description through recharts'
`title`/`desc` props.
`accessibilityLayer` stays, so keyboard users can still move the tooltip
with the arrow keys. To make that work for screen readers,
`ChartContainer` now renders a polite `role="status"` live region that
is always mounted. `ChartTooltipContent` builds the announcement during
render from the same label and item values the tooltip shows, and an
effect keyed on that string pushes it into the live region. Each point
is announced, for example "175 users January 02".
Not verified: NVDA behaviour (whether Tab focus switches to focus mode
so the arrows reach the chart), and an axe re-run on
`/deployment/overview`.
Frontend-review notes:
- **FE1:** the assertions live in story `play` functions. recharts'
keyboard navigation depends on real layout (`getBoundingClientRect`), so
jsdom unit tests can't exercise it.
- **FE10:** `<desc>` is checked with a selector. `dom-accessibility-api`
doesn't compute descriptions from SVG `<desc>`, although Chromium does
per SVG-AAM.
- **FE8:** the announcement string is derived during render. The one
remaining effect only pushes it into `ChartContainer`'s state, because a
component can't update another component's state while rendering.
<details>
<summary>Implementation plan</summary>
## Findings (recharts 2.15.4, verified in `node_modules`)
- `generateCategoricalChart.js:1937-1953`: with `accessibilityLayer`,
the `<svg>` gets `tabIndex = props.tabIndex ?? 0`, `role = props.role ??
"application"`, and `onKeyDown`/`onFocus` handlers. The handlers are
attached whatever the role is, so `role="group"` keeps
ArrowLeft/ArrowRight working.
- Keyboard navigation (`AccessibilityManager.spoofMouse`) goes through
the same `triggeredAfterMouseMove` path as the mouse, so the tooltip
shows the same content for both.
- `container/Surface.js:41`: the `title` and `desc` props render as
`<title>` and `<desc>` children of the `<svg>`. These give the SVG its
accessible name and description.
- `component/Tooltip.js`: `content` is always rendered and receives an
`active` prop. The tooltip wrapper (`TooltipBoundingBox`, `tabIndex=-1`)
is a sibling of the `<svg>` and is `visibility: hidden` when inactive.
That makes it unreliable as a live region, so announcements need their
own element that is always mounted.
- Three charts use `accessibilityLayer`: `UserEngagementChart`
(flagged), `ActiveUserChart`, `LicenseSeatConsumptionChart`. All three
are fixed.
## Changes
1. **Shared live region in `Chart.tsx`:** `ChartContainer` holds the
announcement state and renders an always-mounted `sr-only` live region
next to `ResponsiveContainer`. `ChartTooltipContent` sets the
announcement while active and clears it when inactive.
2. **Per-chart props:** keep `accessibilityLayer`; add `role="group"`,
`aria-roledescription="chart"`, `title` (the section name), and `desc`
(date range plus "Use the left and right arrow keys to read each day.").
## Tests (red, then green)
`play` functions on the existing stories, which run in Chromium through
`@storybook/addon-vitest`:
- **User engagement:** the chart is a named group with roledescription
"chart" and the expected `<desc>`. There is no `application` role.
Focusing the chart and pressing ArrowRight updates the live region.
- **The other two charts:** role and name only.
- **`components/Chart` default story:** without formatters, the
announcement is built from the label, the item name and the value
("January Users 186").
With the source changes reverted, all three tests fail.
## Decision log
- **Role:** `group` rather than `img`, because `img` hides the content
and conflicts with the focusable, arrow-key-driven chart. `figure` has
no interaction meaning, and `graphics-document` has poor screen-reader
support.
- **Keep the arrow-key tooltip** for keyboard users without a screen
reader, and announce changes through a live region.
- **Add `aria-roledescription="chart"`**, so screen readers say "chart"
rather than "grouping".
- **Memoize the `ChartContext` value** in `ChartContainer`, so
announcement updates don't re-render every `useChart` consumer.
`components/Chart` isn't covered by the React Compiler.
- **Deviations from the plan:**
- The live region gained `role="status"`, so it can be queried by role.
- The plan keyed the announcement effect on `active` and `payload`. The
first version instead ran on every render and read the text from the
DOM. Following review, the string is now derived from the label and item
values (strings and numbers only), and the effect depends on that
string.
- The test focuses the chart directly instead of pressing Tab, because
the first Tab stop is the "How we calculate" button.
- The description is checked on `<desc>` rather than with
`toHaveAccessibleDescription` (see FE10 above).
- The planned "live region empties on leave" assertion was dropped,
because recharts doesn't clear the tooltip on blur.
## Known tradeoffs
- **Mouse hover:** moving the mouse over the chart also triggers
announcements for screen-reader users, once per point.
- **NVDA:** NVDA users need to be in focus mode for the arrow keys to
reach the chart. The `desc` hint covers this.
- **No data table:** this PR doesn't add a table alternative to the
chart, so the WCAG 1.1.1 risk for the data itself remains.
</details>
|
||
|
|
4d1f95e73e |
feat: order lifecycle scripts by their dependencies (#30765)
feat(agent): enforce lifecycle script ordering Honor `coder_script_order` dependencies for startup and shutdown scripts using the existing outcome-aware unit manager. Cron, legacy scripts, and scripts without dependencies retain their existing behavior. - Wait for all prerequisites before running. `success` requires a successful prerequisite; `completion` also accepts failure, timeout, or skip. Skip dependents as soon as a required success becomes impossible, preserving the original failure as the lifecycle error. - Reject invalid dependency graphs before any scripts start and write the reason to every selected script's log. - Log unmet dependencies every 30 seconds and explain skips. Populate display names in the manifest so skip messages use readable names, falling back to Terraform addresses. - Exclude dependency waits from script timeouts, record an outcome on every exit, and use fresh state per execution. Cancellation stops waiters without starting dependents or emitting skip messages. Add regression coverage for ordering, skip propagation, timeouts, cancellation, invalid graphs, and unchanged unordered execution. Refs https://linear.app/codercom/issue/PLAT-549/phase-3-enforce-lifecycle-script-ordering |
||
|
|
fa926fcc77 |
docs(docs/admin/security): document workspace secrets (#30252)
Adds a short "Workspace secrets" section to the secrets security page, explaining what workspace secrets are and how they differ from template parameters. Part of [RELAY-7](https://linear.app/codercom/issue/RELAY-7/agent-relay-deliver-provider-credentials-via-coder-secrets-instead-of). **Stack** (design decisions in #30248) 1. #30248 Database schema, queries, and RBAC 2. #30249 Encryption at rest 3. #30250 Set secrets on workspace builds 4. #30251 Deliver secrets to the agent 5. **#30252 Docs (this PR)** 6. #30388 List a build's secrets 7. #30459 Audit a build's secrets - Workspace secrets are set on the create workspace or create build request. - They never reach the provisioner, so they stay out of build parameters, Terraform state, insights, and metrics. - The agent delivers them the same way as user secrets, and they can't be read back through the API. The section is intentionally brief. The API reference covers the request fields. --- *Created by Coder Agents on behalf of @Emyrk.* |
||
|
|
7d75210abf |
feat: deliver workspace secrets in the agent manifest (#30251)
Delivers workspace secrets to the agent, so they show up as env vars and files in the workspace. Part of [RELAY-7](https://linear.app/codercom/issue/RELAY-7/agent-relay-deliver-provider-credentials-via-coder-secrets-instead-of). **Stack** (design decisions in #30248) 1. #30248 Database schema, queries, and RBAC 2. #30249 Encryption at rest 3. #30250 Set secrets on workspace builds 4. **#30251 Deliver secrets to the agent (this PR)** 5. #30252 Docs 6. #30388 List a build's secrets 7. #30459 Audit a build's secrets - The agent receives the secrets of the build that created it, alongside the owner's user secrets. - A workspace secret wins over a user secret on the same env var or file path. - An agent from an older build gets no workspace secrets. - The agent itself needs no changes. <details> <summary>Implementation details</summary> - `GetManifest` finds the agent's build through its resource and provisioner job, then lists that build's live secrets as `AsWorkspaceSecretManager`. - In this PR, precedence comes from order: user secrets are emitted first and workspace secrets after, so the agent applies the workspace value last. #30388 replaces this with `workspacesecrets.Resolve`, which decides one winner per target and is shared with the build secrets API. - The deployment's file path policy applies to both kinds of secret. When file delivery is blocked, a file-only secret is dropped. </details> --- *Created by Coder Agents on behalf of @Emyrk.* |
||
|
|
116660193e |
chore: bump bundled terraform to 1.16.6 (#30516)
Bump the bundled Terraform binary from 1.16.2 to 1.16.6 (latest stable, [released 2026-10-14](https://github.com/hashicorp/terraform/releases/tag/v1.16.6)), following the same file set as #29331: - `provisioner/terraform/install.go`: `TerraformVersion` (`maxTerraformVersion` stays at 1.16.9 since this is a patch bump) - `install.sh`, `scripts/Dockerfile.base` - `mise.toml`, `mise.lock` (checksums from HashiCorp's `terraform_1.16.6_SHA256SUMS`) - `flake.nix` (fetchurl SRI hashes derived from the same SHA256SUMS) - `docs/install/prepare/airgap.md`: the example Dockerfile `ARG TERRAFORM_VERSION` had drifted back to 1.11.0 after the docs move; updated to 1.16.6 Verified locally with `go test ./provisioner/terraform/ -run 'TestInstall|Version'`. Opened by Superblink on behalf of @droopy4096. _Updated from 1.16.5 to 1.16.6 (adds an HTTP/2 resource-exhaustion fix). Branch name still says 1.16.5. Fixture fingerprint (`generation.sha1`) regenerated; `go test ./provisioner/terraform/ -run 'TestInstall|Version|Golden'` passes._ --------- Co-authored-by: coder[bot] <137810501+coder[bot]@users.noreply.github.com> Co-authored-by: Dmitry Makovey <dmakovey@yahoo.com> |
||
|
|
f25b6294b6 |
feat: set workspace secrets on workspace builds (#30250)
Lets clients set secrets when creating a workspace or a build. Secrets are saved with the build and are never sent to the provisioner. Part of [RELAY-7](https://linear.app/codercom/issue/RELAY-7/agent-relay-deliver-provider-credentials-via-coder-secrets-instead-of). **Stack** (design decisions in #30248) 1. #30248 Database schema, queries, and RBAC 2. #30249 Encryption at rest 3. **#30250 Set secrets on workspace builds (this PR)** 4. #30251 Deliver secrets to the agent 5. #30252 Docs 6. #30388 List a build's secrets 7. #30459 Audit a build's secrets - `secrets` is a new field on the create workspace and create build requests. - Each secret is delivered as an env var, a file, or both. `ephemeral` secrets last for one build only. - Secrets carry forward to every later build until a request replaces or removes them. - A secret set on another secret's env var or file path replaces that secret entirely. - A null `value` removes a secret, which needs `update` permission on the owner's workspace secrets. - Deleting a workspace clears its secret values. Secrets are stored but not delivered to the agent until #30251. <details> <summary>Example request</summary> ```json POST /api/v2/workspaces/{workspace}/builds { "transition": "start", "secrets": [ { "name": "openai-key", "value": "sk-...", "env_name": "OPENAI_API_KEY" }, { "name": "kubeconfig", "value": "apiVersion: v1 ...", "file_path": "~/.kube/config" }, { "name": "session-jwt", "value": "eyJ...", "env_name": "SESSION_JWT", "ephemeral": true }, { "name": "old-token", "value": null } ] } ``` </details> <details> <summary>Implementation details</summary> - Validation reuses the user secret field rules and the file path delivery policy. It rejects: - duplicate names, env names, or file paths within one request - a removal that also sets a target or `ephemeral` - In the build transaction, the builder: 1. copies the previous build's live, non-ephemeral secrets that the request does not name or take over 2. inserts the requested secrets 3. "Earlier builds' rows are cleared when the new build's job completes - Copying and clearing run as `AsWorkspaceSecretManager`, so autostart and other system-initiated builds work without secret permissions. Requested secrets are authorized as the build's actor. - Each row records `source` (`request` or `carry_forward`). - Per-build limit violations return a 400. - A completed delete in `provisionerdserver`, or an orphan delete in the builder, clears the workspace's values and keeps the rows. </details> --- *Created by Coder Agents on behalf of @Emyrk.* |
||
|
|
5cd67a418d |
chore: johnstcn -> mafredri as code owner for protobufs (#30852)
Replace Cian with maf as a code owner for our protobufs. |
||
|
|
58a71f6238 |
feat(enterprise/dbcrypt): encrypt workspace secrets (#30249)
Encrypts workspace secret values at rest with the existing database encryption keys, and adds workspace secrets to the `coder server dbcrypt` commands. Part of [RELAY-7](https://linear.app/codercom/issue/RELAY-7/agent-relay-deliver-provider-credentials-via-coder-secrets-instead-of). **Stack** (design decisions in #30248) 1. #30248 Database schema, queries, and RBAC 2. **#30249 Encryption at rest (this PR)** 3. #30250 Set secrets on workspace builds 4. #30251 Deliver secrets to the agent 5. #30252 Docs 6. #30388 List a build's secrets 7. #30459 Audit a build's secrets - Values are encrypted when a secret is written and decrypted when it is read. - `dbcrypt rotate` and `dbcrypt decrypt` re-encrypt or decrypt workspace secrets, 1,000 at a time. - `dbcrypt delete` clears workspace secret values instead of deleting the rows, so build history is kept. <details> <summary>Implementation details</summary> - `InsertWorkspaceSecret` and `UpdateEncryptedWorkspaceSecretValue` encrypt, and `ListActiveWorkspaceSecrets` and `GetWorkspaceSecrets` decrypt. Only live rows reach these paths, so there is no NULL handling. - Rotate and decrypt page through `GetWorkspaceSecrets` by `id`, so memory is bounded on large deployments. Only live rows are listed, about one set per workspace. - If a build clears a row between the list and the update, the update matches no row and that row is skipped. - Secret size limits count stored ciphertext bytes, the same as user secrets. Fixing that for both is tracked in #30441. </details> --- *Created by Coder Agents on behalf of @Emyrk.* |
||
|
|
d36c1535d5 |
fix: bump Go version from 1.26.5 to 1.26.9 (#30807)
Bump the Go toolchain from 1.26.5 to 1.26.9 ([released 2026-10-02](https://go.dev/doc/devel/release#go1.26.9)). Tracked in Linear: [ENT-210](https://linear.app/codercom/issue/ENT-210/ironbank-critical-bump-go-to-1269-fix-by-2026-10-29). Iron Bank fix-by date for the Critical finding is **2026-10-29**. Go 1.26.9 includes fixes for the findings Iron Bank reported against `coder/coder-enterprise/coder-service-2:2.38.0`. Of the 19 still-valid advisories, 12 are only fixed in 1.26.9, including the Critical one: - Critical: [GO-2026-6612](https://pkg.go.dev/vuln/GO-2026-6612) / CVE-2026-78663 (HTTP/2 server double flow-control refund) - High: GO-2026-6603, -6605, -6607, -6608, -6609, -6610, -6611, -6613 - Low: GO-2026-6599, -6600, -6617 The other 7 (GO-2026-5026, -5942, -6088, -6089, -6090 High; -6091, -6218 Medium) are fixed since 1.26.6. The full list with links is in ENT-210. ## Changes Same file set as #27157: - `go.mod`: `go 1.26.5` to `go 1.26.9` - `mise.toml` / `mise.lock`: Go toolchain pin and the archive URLs and SHA-256 checksums for each platform (taken from the official `go.dev/dl` release list) ## Verification - `go build ./enterprise/cmd/coder` with go1.26.9 succeeds; `go mod tidy -diff` is clean. - `govulncheck -mode binary` on the resulting binary reports none of the 19 advisories above. The same scan of the released 2.38.0 binary (go1.26.5) reports all 19. ## Not in this PR `golang.org/x/net` v0.60.0 (the module-side half of GO-2026-6603, -6610, -6611, -6612 and -6617) is already on `main` via #30772 and is backported to the release branches in #30814 (2.38), #30815 (2.37), #30816 (2.36), #30817 (2.35) and #30818 (2.34), tracked in [ENT-211](https://linear.app/codercom/issue/ENT-211/ironbank-critical-bump-golangorgxnet-to-v0600-on-release-branches-fix). The Go 1.27.1 bump (#30288) stays a separate, larger change. Go backports: #30808 (2.38), #30809 (2.37), #30810 (2.36), #30813 (2.35), #30811 (2.34). Opened by Superblink on behalf of @droopy4096. |
||
|
|
9eba637584 |
docs(docs/ai-coder/agents): reformat to one sentence per line (#30700)
Reformats the Coder Agents docs under `docs/ai-coder/agents` to one sentence per line, as the [docs style guide](https://github.com/coder/coder/blob/main/docs/.style/style-guide/formatting.md#one-sentence-per-line) requires. Hard-wrapped paragraphs are unwrapped and lines holding several sentences are split, so a later edit to one sentence shows up as a one-line diff. Apart from the exception below, only whitespace inside paragraphs and list items changes, and the rendered pages are the same. Comparing the changed files against `main` word for word, ignoring whitespace and blockquote `>` markers, finds differences only on the reworded lines. `git diff --word-diff` is easier to read than the line diff. 59 lines that already contained an em or en dash were reworded by hand, because `lint/emdash` treats every reflowed line as newly added. Each uses a parenthetical, a separate sentence, or a colon after a lead-in. Dashes on lines the reflow did not touch are left alone. Applied with an in-progress formatter, limited to pages listed in `docs/manifest.json` and excluding generated reference docs. This is one of a batch of PRs that split the docs by area (21 files changed, 870 insertions(+), 1294 deletions(-)). --- 🤖 Built with AI assistance. |
||
|
|
7aef110ca2 |
feat: add workspace secrets table, queries, and RBAC (#30248)
Adds the database table, queries, and permissions for workspace secrets: secrets set on a workspace build and delivered to the agent, never to Terraform. Each secret belongs to one workspace build. A new build copies the previous build's secrets, then the old copies lose their values but stay as history. |
||
|
|
17ec9459c0 |
fix(scripts/dogfood): pass GO_LINT_NEW_CODE_BASE to the image lint run (#30851)
Fixes the `build_image (26.04)` failure in the `dogfood` workflow on PRs into `main` (seen on #30807). Tracked in [ENT-213](https://linear.app/codercom/issue/ENT-213). ## Problem `lint/go/new-code` (added in #30622) runs `.golangci.new-code.yaml` with `--new-from-merge-base=$(GO_LINT_NEW_CODE_BASE)`, which defaults to `origin/main`. `ci.yaml` sets `GO_LINT_NEW_CODE_BASE` to `HEAD^1` for PRs and `HEAD` otherwise. `scripts/dogfood/test_image.sh` doesn't pass it into the container, and the dogfood checkout (depth 2) has no `origin/main`. So `make lint` inside the image reports the whole tree (1263 issues: errcheck 437, forbidigo 42, nolintlint 784) and fails "Test image tooling". Pushes to `main` run the same validation before pushing the image, so the next dogfood-triggering merge to `main` would also fail and skip the Docker Hub push. ## Change `scripts/dogfood/test_image.sh` only: - Under GitHub Actions, and when `GO_LINT_NEW_CODE_BASE` isn't already set, default it to `HEAD^1` for `pull_request` and `HEAD` otherwise, mirroring `ci.yaml`. - Forward it into the container with `--env GO_LINT_NEW_CODE_BASE`. - Local runs are unchanged: the variable stays unset unless you set it, so the Makefile default (`origin/main`) applies. This PR touches `scripts/dogfood/**`, which triggers the `dogfood` workflow, so its own `build_image (26.04)` run is the end-to-end test. Opened by Superblink on behalf of @droopy4096. Co-authored-by: coder[bot] <137810501+coder[bot]@users.noreply.github.com> Co-authored-by: Dmitry Makovey <dmakovey@yahoo.com> |
||
|
|
c6a47c4428 |
docs: replace references to the retired Enterprise license tier (#30853)
## Summary Coder has only Community and Premium license tiers, but several docs pages, CLI help strings, and SDK field comments still called features "Enterprise" or "enterprise-only". This PR changes them to say Premium and regenerates the reference docs built from those strings. Resolves [DOCS-1298](https://linear.app/codercom/issue/DOCS-1298/remove-references-to-the-retired-enterprise-license-tier). ## Changes - `docs/admin/users/quotas.md`: Replace "scoped to Groups in Enterprise and organizations in Premium" with a correct sentence. Quotas are Premium, allowances are set on groups, and each user's budget is calculated separately in each organization (per `GetQuotaAllowanceForUser`). - `docs/user-guides/workspace-lifecycle.md`: Replace "Enterprise" with Premium, and correct the quotas sentence to match the quotas page. - `docs/ai-coder/agents/platform-controls/mcp-servers.md`: Replace "enterprise entitlement" with Premium license. - `cli/templatecreate.go`, `cli/templateedit.go`: Update `--require-active-version`, `--allow-user-autostart`, and `--allow-user-autostop` help text. Point the `--require-active-version` help at the renamed `#template-update-policies` section, because the old `#require-automatic-updates-enterprise` anchor is broken. Make the errors for these flags tier-neutral. - `enterprise/cli/features.go`: `coder features` now says "List license features and entitlements", and its AGPL error no longer names a tier. - `codersdk/templates.go`, `codersdk/organizations.go`: Update field comments that feed the API reference and TypeScript types. - `docs/reference/glossary.md`: The Premium entry now says "paid license tier" instead of "paid enterprise tier". - `docs/.style/style-guide/voice-and-tone.md`: The example sentence now says "Premium licensing". - Regenerated: CLI golden files, `docs/reference/cli/`, `docs/manifest.json`, `docs/manifest/generated/cli.json`, `docs/reference/api/`, `coderd/apidoc/`, and `site/src/api/typesGenerated.ts`. ## Testing - `go test ./cli -run 'TestCommandHelp|TestCliTemplateCreate'` and `go test ./enterprise/cli -run 'TestEnterpriseCommandHelp|TestTemplateCreate|TestTemplateEdit|TestFeaturesList'` pass. - The pre-commit hook passed, including `make gen`, `fmt`, `lint/go`, `lint/ts`, `lint/markdown`, and a slim build. <details> <summary>Decisions and out-of-scope items</summary> ### Decisions - **Premium wording and legacy Enterprise licenses:** Coder still accepts existing Enterprise licenses, and `FeatureSetEnterprise` includes the features labeled Premium here. Docs and help text say "Premium" because that is the tier sold today, and about 25 other docs pages already use "Premium feature". Error strings are tier-neutral, so they're accurate for every license holder. - **Glossary and style guide:** The issue marked these as borderline. Both were one-word changes, so I made them. ### Not changed - `docs/reference/api/enterprise.md` keeps the "Enterprise" sidebar title. It comes from the swagger tag on the `enterprise/` Go package, so renaming it is a larger change. - Other "Enterprise" references the review flagged as out of scope: the `coder server --help` option group, quiet hours SDK comments, internal `coderd` comments, and the dashboard's "Enterprise" badge on the require-active-version option. - No docs page says that legacy Enterprise licenses are still valid. - Uses that don't refer to the license tier: GitHub Enterprise, Red Hat Enterprise Linux, "enterprise environments", and `enterprise/` package paths. </details> --- _This PR was generated by Coder Agents on behalf of @nickvigilante._ |
||
|
|
4ae1b7bd28 |
docs(docs/user-guides): fix tab block class typo on the remote desktops page (#30862)
## Summary The VNC section of the Remote desktops page opened its nested tab block with `<div class="tab">` instead of `<div class="tabs">`. The new docs site converts only `class="tabs"` blocks into tabs, so **Coder Desktop** and **CLI** rendered as `<h4>` headings directly under the `## VNC` heading. The outer tab's **Desktop Client** label isn't a heading, so the page skipped from h2 to h4, and axe reports `heading-order`. This was the only occurrence of the typo in `docs/`. ## QA | Page | Production | Expected after merge | | --- | --- | --- | | Remote desktops, VNC section | [beta-docs @main](https://coder.com/beta-docs/@main/user-guides/workspace-access/remote-desktops/#vnc) | **Coder Desktop** and **CLI** render as tabs inside **Desktop Client**, with no h4 headings | The default version on beta-docs (v2.37.4) has the same typo, so the fix shows there only after the next release. A docs-engine change that warns on `class="tab"` at build time is tracked separately. Linear: [DOCS-1306](https://linear.app/codercom/issue/DOCS-1306/fix-div-classtab-typo-that-leaves-stray-h4-headings-on-remote-desktops) --- 🤖 Built with AI assistance. |
||
|
|
0dc36786de |
docs(docs/.style): add compliance-claims wording rule to the style guide (DOCS-1256) (#30778)
Adds a "Describe what Coder does, not compliance outcomes" rule to the
docs style guide's word-choice page, so writers and reviewers have one
place for compliance-claim wording.
- The rule says to describe Coder's controls, not the reader's
compliance status, and to back every certification, audit, validation,
or authorization claim with a current artifact.
- A Do/Don't table covers SOC 2, ISO/IEC 27001, FIPS 140-3, FedRAMP and
DoD Impact Levels, DISA STIG, Iron Bank, CMMC, HIPAA, GDPR, DORA, and
the AI Act, with the reason behind each entry.
- The style guide README coverage counts move from 79 to 80 rules (Word
choice: 17 rules, 10 planned), and the Vale README lists the planned
`Coder.ComplianceClaims` rule.
Resolves DOCS-1256.
<details>
<summary>Decision log</summary>
- **Self-contained phrasing.** The approved phrasing comes from an
internal assessment that can't be linked from public docs, so the rule
states each term directly instead of pointing to it.
- **Facts checked before writing:**
- The AICPA issues no SOC 2 certificate; a CPA firm issues an
attestation report.
- ISO doesn't certify; a certification body certifies a management
system within a scope.
- CMVP validates modules under a certificate number; FIPS 140-2
certificates moved to the Historical list in September 2026.
- FedRAMP authorizes cloud service offerings, which a self-hosted
deployment isn't.
- CMMC certifies organizations; HIPAA has no certification program.
- **Scope limits:** protocol conformance ("specification-compliant OIDC
provider") and sentences where the reader is the subject stay allowed,
so the planned lint rule doesn't flag them.
- **Enforcement:** the footer marks `Coder.ComplianceClaims` as planned.
The Vale rule itself is separate work.
- Checks: `make lint/style-claims`, `markdownlint-cli2`, `vale`,
`check_emdash.sh`, and the pre-commit hook pass locally.
</details>
<details>
<summary>CI note: Storybook failure is unrelated</summary>
The `Storybook` job failed when the Pixel snapshot service marked its
build as failed (31 snapshots awaiting review). This PR changes only
Markdown under `docs/.style/` and touches no `site/` code or stories.
</details>
---
_Generated by Coder Agents on behalf of @nickvigilante._
|
||
|
|
1f61a290e7 |
docs(docs/ai-coder): reformat AI Gateway client and Agent Firewall docs to one sentence per line (#30702)
Reformats the AI Gateway client and proxy docs, the Agent Firewall docs, and the top-level pages under `docs/ai-coder` to one sentence per line, as the [docs style guide](https://github.com/coder/coder/blob/main/docs/.style/style-guide/formatting.md#one-sentence-per-line) requires. Hard-wrapped paragraphs are unwrapped and lines holding several sentences are split, so a later edit to one sentence shows up as a one-line diff. Apart from the exception below, only whitespace inside paragraphs and list items changes, and the rendered pages are the same. Comparing the changed files against `main` word for word, ignoring whitespace and blockquote `>` markers, finds differences only on the reworded lines. `git diff --word-diff` is easier to read than the line diff. 1 lines that already contained an em or en dash were reworded by hand, because `lint/emdash` treats every reflowed line as newly added. Each uses a parenthetical, a separate sentence, or a colon after a lead-in. Dashes on lines the reflow did not touch are left alone. Applied with an in-progress formatter, limited to pages listed in `docs/manifest.json` and excluding generated reference docs. This is one of a batch of PRs that split the docs by area (27 files changed, 414 insertions(+), 513 deletions(-)). --- 🤖 Built with AI assistance. |
||
|
|
c58ac71ca3 |
docs(docs/tutorials): reformat to one sentence per line (#30703)
Reformats the tutorials under `docs/tutorials` to one sentence per line, as the [docs style guide](https://github.com/coder/coder/blob/main/docs/.style/style-guide/formatting.md#one-sentence-per-line) requires. Hard-wrapped paragraphs are unwrapped and lines holding several sentences are split, so a later edit to one sentence shows up as a one-line diff. Apart from the exception below, only whitespace inside paragraphs and list items changes, and the rendered pages are the same. Comparing the changed files against `main` word for word, ignoring whitespace and blockquote `>` markers, finds differences only on the reworded lines. `git diff --word-diff` is easier to read than the line diff. 9 lines that already contained an em or en dash were reworded by hand, because `lint/emdash` treats every reflowed line as newly added. Each uses a parenthetical, a separate sentence, or a colon after a lead-in. Dashes on lines the reflow did not touch are left alone. The two reverse proxy tutorials also write `*.coder.example.com` in backticks instead of escaping the asterisk, which the formatter would otherwise drop. Applied with an in-progress formatter, limited to pages listed in `docs/manifest.json` and excluding generated reference docs. This is one of a batch of PRs that split the docs by area (19 files changed, 656 insertions(+), 1265 deletions(-)). --- 🤖 Built with AI assistance. |
||
|
|
c85ebc1346 |
fix: make workspace create denials on behalf of another user actionable (#30537)
Creating a workspace for another user as a caller without permission returned the same 403 as creating your own: "You are unable to create a workspace in this organization. It is possible to have access to the template, but not be able to create a workspace." For service accounts and integrations that always create for someone else, that doesn't say who the workspace was for, which organization, or what to do about it. When the caller is not the owner, the two 403s now say what is missing and for whom. Messages and details only; status codes and authorization are unchanged, and self-creates keep their existing text. Missing create permission: > You can't create workspaces for other users in this organization. > Creating a workspace for "alice" needs permission to create workspaces owned by other users in organization "coder", which your account doesn't have. Use an account with that permission (for example an organization admin), or create the workspace as "alice". Missing `use` on the template: > You can't use the template "demo" to create workspaces for other users. > Creating a workspace for "alice" from this template needs "use" access to template "demo", which your account doesn't have. Ask a template admin to grant it, or use an account that has it. `preflightWorkspaceCreate` now receives the caller's ID and the owner (name included) instead of just the owner ID. `coder create` prints the detail already, and the web UI shows it through `ErrorAlert`. **How it renders** Web UI (create page, `ErrorAlert`): <img width="2592" height="1490" alt="Web UI error for creating a workspace on behalf of another user" src="https://github.com/user-attachments/assets/9b1f1378-e4df-40df-8b6f-ca6cccdc4238" /> CLI (`coder create alice/ws1 --template demo` as a plain member): ``` error: Trace=[create workspace: ] You can't create workspaces for other users in this organization. Creating a workspace for "alice" needs permission to create workspaces owned by other users in organization "coder", which your account doesn't have. Use an account with that permission (for example an organization admin), or create the workspace as "alice". ``` Refs PLAT-726. Related owner-state inconsistencies are tracked in PLAT-749. |
||
|
|
7e69cd0af7 |
chore: refresh AI model price book (#30828)
## Price book changes 0 models added, 0 models removed, 24 models changed. <details> <summary>Changed</summary> - openrouter/deepseek/deepseek-v4-pro - openrouter/deepseek/deepseek-v4-pro-0813 - openrouter/deepseek/deepseek-v4.1-flash - openrouter/google/gemma-4-31b-it - openrouter/minimax/minimax-m2.5 - openrouter/mistralai/mistral-small-3.2-24b-instruct - openrouter/moonshotai/kimi-k3 - openrouter/openai/gpt-5.6-sol - openrouter/openai/gpt-5.6-sol-pro - openrouter/openai/gpt-oss-120b - openrouter/qwen/qwen3.6-35b-a3b - openrouter/qwen/qwen3.8-27b - openrouter/tencent/hy3 - openrouter/tencent/hy4-preview - openrouter/z-ai/glm-5 - openrouter/z-ai/glm-5.1 - openrouter/z-ai/glm-5.2 - openrouter/z-ai/glm-5.3 - openrouter/~deepseek/deepseek-flash-latest - openrouter/~deepseek/deepseek-pro-latest - openrouter/~google/gemini-pro-latest - openrouter/~moonshotai/kimi-latest - openrouter/~z-ai/glm-flash-latest - openrouter/~z-ai/glm-latest </details> ## Review notes Regenerated by `make gen/aibridge-prices` from the live [models.dev](https://models.dev) catalog. Both artifacts come from one snapshot, so they ship together: - `coderd/aibridge/prices/data/prices.json` - `site/src/modules/aiModels/knownModels/knownModelsGenerated.json` These are customer-visible cost numbers taken from upstream data, so this PR is never merged automatically. The summary above lists what moved; check the diff for exact figures before approving. Opened automatically by the [aigateway-prices-refresh workflow](https://github.com/coder/coder/actions/runs/38710433812). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
aef7f15510 |
fix(coderd/x/chatd): only retry without drop_block when it's rejected (#30821)
In #29792, once a provider and model had accepted `drop_block`, any 400 on a request with it retried once without it, since I didn't know what error a provider returns for an unsupported beta. That turned out to hide real errors. On dogfood, a chat replaying some very tall screenshots hit Anthropic's many-image limit: ``` messages.9.content.43.image.source.base64.data: At least one of the image dimensions exceed max allowed size for many-image requests: 3000 pixels ``` The retry without `drop_block` then hit the stale thinking block, so the chat failed with the binding error instead, and the image error only showed up in a warn log. To fix, we'll only retry without `drop_block` when the 400 is a known rejection of the field or its beta, and otherwise return the error as is and keep the hint. The catch is that if a provider rejects the beta with an error we don't recognise, chats on that model will see it until a restart clears the hint, rather than us recovering. Claude Code (as of 2.1.300) does the same on Anthropic's own API, Claude Platform on AWS included: it only retries without the beta when the 400 names it or the `block_binding` field. On Bedrock, Vertex and Mantle it also retries on any 400 it doesn't otherwise recognise, which we could copy if that catch turns out to matter. The oversized screenshots are a separate problem, since chatd doesn't resize images at all. |
||
|
|
1d57682dab |
fix: give buttons accessible names (#30796)
Fixes the axe `button-name` (WCAG 4.1.2) findings from the Deque audit:
- fixes DEQ-431
- fixes DEQ-456
- fixes DEQ-101 (duplicate of DEQ-456)
- fixes DEQ-138
affected buttons:
- **Workspace sharing role selects** (DEQ-431, DEQ-456, DEQ-101): Radix
Select triggers render `role="combobox"`, and ARIA doesn't let a
combobox take its name from its content. That's why the visible
"Use"/"Admin" text didn't count. Each member row's select is now named
`Role for <member>`. The add-member form's select is named `Role`.
- **Agent logs "Copy selected logs" button** (DEQ-138): the icon-only
button had a name only in its tooltip. It now has `sr-only` text,
matching the download button next to it.
Adds Vitest coverage in `WorkspaceSharingForm.test.tsx`. The test finds
each select by its accessible name and checks that changing the role
calls the update callback. It fails without the fix.
<details>
<summary>Implementation notes and review decisions</summary>
**Mapping axe selectors to components**
- DEQ-431: `form > div > button:nth-child(2)` is `RoleSelectField` in
`AddWorkspaceUserOrGroup`.
- DEQ-456 / DEQ-101: `table > tbody > tr > td:nth-child(2) > button` is
`RoleSelect` in `WorkspaceSharingForm`.
- DEQ-138: `section:nth-child(3)` (agent card logs section) `> … >
div:nth-child(2) > button:nth-child(1)` is the copy button in the
`AgentRow` logs toolbar. `data-state="closed"` with no `aria-expanded`
means it's a Tooltip trigger.
**Justified findings from the frontend review (`frontend-deep-review`
and `frontend-review`)**
- FE1/TS5, no Vitest for the copy button: rendering `AgentRow` with
streamed logs needs the proxy context and websocket log fixtures. The
change only adds an `sr-only` label. I removed a story `play` assertion
that I'd first added, because FE1 bans assertions in `play` functions.
- FE6, label-in-name (WCAG 2.5.3): the combobox's visible text is its
*value* ("Use"/"Admin"), not its label. The visible label is the "Role"
column header, and the accessible names include it. Screen readers still
announce the value from the trigger's content.
- Not changed: the copy button's tooltip switches to "Copied!" but
screen readers hear no announcement. That was already the case before
this PR, and it's a different WCAG criterion (4.1.3), so it's out of
scope here.
**Checks run:** `pnpm check`, `pnpm lint:types`, `pnpm lint`, the unit
tests, the `AgentRow` / `WorkspaceSharingPage` / `WorkspaceActions`
story tests, and `make pre-commit`.
</details>
---
_Generated by Coder Agents on behalf of @aqandrew._
|
||
|
|
603dd420d1 |
feat: add ServerTailnet logs and metrics for unreachable agents (#30133)
Add default-level metrics and warn-level diagnostics to investigate ServerTailnet reachability failures causing agent-specific 502s, without restarting coderd or enabling debug logging. - Enrich request logs and PTY/chatd warnings with agent ID, failure reason, wait duration, coordinator state, WireGuard handshake and byte counts, and DERP regions. - Add metrics for unreachable attempts by reason, reachability latency, embedded DERP connections, and offline app/terminal requests. - Distinguish reachability failures from subsequent TCP dial failures, cap reverse proxy dials at one minute, and exclude expected chatd readiness polls and superseded-agent dials from unreachable counts. - Report missing handshakes as zero time instead of 1970, also fixing `coder ping`. Part of PLAT-680, a sub-issue of PLAT-360. |
||
|
|
609c5b95fb |
chore: bump github.com/moby/sys/user from 0.4.0 to 0.4.1 (#30534)
Bumps [github.com/moby/sys/user](https://github.com/moby/sys) from 0.4.0 to 0.4.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/moby/sys/releases">github.com/moby/sys/user's releases</a>.</em></p> <blockquote> <h2>mountinfo v0.4.1</h2> <p>Fixes and improvements:</p> <ul> <li>Fix PrefixFilter() being too greedy (<a href="https://redirect.github.com/moby/sys/issues/61">#61</a>)</li> <li>TestMountedBy*: add missing pre-checks (ce8f425e79a74602c4055fb1776f38043d56827b)</li> <li>Documentation improvements (<a href="https://redirect.github.com/moby/sys/issues/52">#52</a>)</li> </ul> <h2>user/v0.4.1</h2> <h2>What's Changed</h2> <ul> <li>user: prevent possible DoS via unbounded parsing of user and group database files in CVE-2026-61801 / <a href="https://github.com/moby/sys/security/advisories/GHSA-mjcv-p78q-w5fw">GHSA-mjcv-p78q-w5fw</a>. This fixes a similar issue as CVE-2026-47262 in containerd.</li> <li>user: prevent falling back to looking up numeric usernames and improve handling of numeric user/group to prevent looking up numeric values as usernames. This fixes a similar issue as CVE-2026-46680 in containerd. <a href="https://redirect.github.com/moby/sys/pull/221">moby/sys#221</a></li> <li>user: bump Go to 1.18, modernize <a href="https://redirect.github.com/moby/sys/pull/198">moby/sys#198</a></li> <li>user: make code a bit more DRY <a href="https://redirect.github.com/moby/sys/pull/225">moby/sys#225</a></li> <li>user: test cleanups <a href="https://redirect.github.com/moby/sys/pull/226">moby/sys#226</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/moby/sys/compare/user/v0.4.0...user/v0.4.1">https://github.com/moby/sys/compare/user/v0.4.0...user/v0.4.1</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/moby/sys/commit/85a71bbe1faa36c552a960e6a5f3d0cfb632fbbe"><code>85a71bb</code></a> Merge commit from fork</li> <li><a href="https://github.com/moby/sys/commit/2c56c3d5d089bfa66d01b6c0bb69428e9d5d18c5"><code>2c56c3d</code></a> user: limit line length in ParseGroupFilter</li> <li><a href="https://github.com/moby/sys/commit/bba2f13154cb607bfbc7e209f8d9100ef4000329"><code>bba2f13</code></a> user: limit reads from user database files</li> <li><a href="https://github.com/moby/sys/commit/ee79b0e8cbbf36c26a182e94e0ec41c5c1c09c34"><code>ee79b0e</code></a> Merge pull request <a href="https://redirect.github.com/moby/sys/issues/221">#221</a> from thaJeztah/limit_uidgid</li> <li><a href="https://github.com/moby/sys/commit/6eb9f1533f265128f3172f26319ac4ec337e2cdc"><code>6eb9f15</code></a> user: GetAdditionalGroups: treat numeric group arguments as GIDs only</li> <li><a href="https://github.com/moby/sys/commit/c66bd2df666e11742905d01b82273f8a1db1be0c"><code>c66bd2d</code></a> user: prevent falling back to looking up numeric usernames</li> <li><a href="https://github.com/moby/sys/commit/c87335998b73cbe3ecbf4bb8372e3118edb8e835"><code>c873359</code></a> Merge pull request <a href="https://redirect.github.com/moby/sys/issues/226">#226</a> from thaJeztah/user_test_cleanups</li> <li><a href="https://github.com/moby/sys/commit/f41a5ef1732cf3793717f6b0ff126116ddde8874"><code>f41a5ef</code></a> Merge pull request <a href="https://redirect.github.com/moby/sys/issues/225">#225</a> from thaJeztah/user_dry</li> <li><a href="https://github.com/moby/sys/commit/5c2e8a01a7ce7f2456dbcd706173161e035d4df5"><code>5c2e8a0</code></a> user: add test-cases for maxID (math.MaxInt32)</li> <li><a href="https://github.com/moby/sys/commit/e001aea433c246e3011c4f3bdab96a209f194510"><code>e001aea</code></a> user: use sub-tests</li> <li>Additional commits viewable in <a href="https://github.com/moby/sys/compare/user/v0.4.0...user/v0.4.1">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/coder/coder/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
e7c2fd5d2e |
feat: add Gemini 4 Argon to Agents and AI Gateway (#30780)
Add Gemini 4 Argon to the Agents known models catalog, so it appears as a suggestion when an admin adds a chat model, and regenerate the AI Gateway price book from models.dev. | Provider | Model ID | Placed before | |---|---|---| | google | `gemini-4-argon` | `gemini-3.1-pro-preview` | | openrouter, vercel | `google/gemini-4-argon` | `google/gemini-3.8-flash` | **Pricing.** The price book carries Google's launch rates on google, openrouter, vercel, and copilot: $2 per 1M input tokens, $10 per 1M output tokens, and $0.10 per 1M cached input tokens. Google doubles them on 2026-12-01 ($4, $20, $0.20); the weekly refresh picks that up once models.dev changes. The google entry keeps models.dev's 32,768 max output tokens, the cap Google enforces on non-streaming `generateContent` calls (larger values return HTTP 400 there). **Thinking levels.** `googleSupportedThinkingLevels` did not recognize the `argon` name token and failed closed, so chatd sent Argon no `thinking_level` and no `include_thoughts`: the native Google path dropped the reasoning effort, and neither path showed thought summaries. Argon accepts LOW, MEDIUM, and HIGH like Gemini 3.1 Pro and rejects MINIMAL, so the map now treats it like the Pro family. **Upstream drift.** `prices.json` covers every model of its 8 providers, so the regeneration also brings the changes since the last weekly refresh, all on OpenRouter and Vercel: 14 other new entries, 26 entries models.dev delisted, and 51 price changes. The catalog picks up the same changes for 8 curated OpenRouter entries (DeepSeek, Kimi, Qwen, and GLM). ## Testing - Live requests to `gemini-4-argon` through the AI Gateway's Google provider (Google's OpenAI-compatible endpoint): `reasoning_effort` and `thinking_level` values `low`, `medium`, and `high` return 200 and `minimal` returns 400; `include_thoughts` returns thought text in streaming and non-streaming responses. - Red-green: removing the `argon` token fails `TestGoogleSupportedThinkingLevels/gemini-4-argon` (expected LOW, MEDIUM, HIGH; got nil). - Regenerating from the saved models.dev snapshot reproduces both generated files byte for byte. - `go test ./scripts/aibridgepricesgen/... ./coderd/aibridge/prices/... ./coderd/x/chatd/chatprovider/...` and `pnpm exec vitest run --project=unit src/modules/aiModels/` pass. The pre-commit hook passed; local pre-push checks were skipped, so CI is the first full run. ## Review record - Frontend review: the only `site/` change is the generated `knownModelsGenerated.json`, so the FE1 to FE10 checklist does not apply; no hand-written frontend code changed. > Xum opened this PR on behalf of @ibetitsmike. |
||
|
|
11f1ee7d9f |
ci: fail the test process with a heap profile when memory passes a per-runner limit (#30487)
test: add memory guard and heap profiles for CI timeouts Add a memory guard to `cli`, `agent`, and `enterprise/cli` to diagnose recurring macOS `test-go-pg` timeouts. Recent logs show runaway memory usage and heavy swapping, but the allocation source remains unknown. - Check Go runtime memory once per second, with per-process CI limits of 5 GiB on macOS and 6 GiB on Linux and Windows. Disabled when `CODER_TEST_MEMORY_LIMIT_MIB` is unset. - On exceeding the limit, save a heap profile, attempt a second profile after forced GC with a five-second wait limit, then panic with memory usage, profile paths, and all goroutine stacks. - Upload heap profiles from unsuccessful CI jobs on every OS, retaining them for seven days. - Test guard lifecycle, environment parsing, panic diagnostics, profile validity, and post-GC allocation attribution. Validate with race tests, vet, lint, and a manual macOS test. Refs https://linear.app/codercom/issue/PLAT-251/flake-test-go-pg-macos-job-timeoutcancelled Refs https://github.com/coder/internal/issues/1365 |
||
|
|
c647260901 |
docs(docs/ai-coder/ai-gateway): reformat to one sentence per line (#30701)
Reformats the AI Gateway docs directly under `docs/ai-coder/ai-gateway` to one sentence per line, as the [docs style guide](https://github.com/coder/coder/blob/main/docs/.style/style-guide/formatting.md#one-sentence-per-line) requires. Hard-wrapped paragraphs are unwrapped and lines holding several sentences are split, so a later edit to one sentence shows up as a one-line diff. Apart from the exception below, only whitespace inside paragraphs and list items changes, and the rendered pages are the same. Comparing the changed files against `main` word for word, ignoring whitespace and blockquote `>` markers, finds differences only on the reworded lines. `git diff --word-diff` is easier to read than the line diff. 4 lines that already contained an em or en dash were reworded by hand, because `lint/emdash` treats every reflowed line as newly added. Each uses a parenthetical, a separate sentence, or a colon after a lead-in. Dashes on lines the reflow did not touch are left alone. Applied with an in-progress formatter, limited to pages listed in `docs/manifest.json` and excluding generated reference docs. This is one of a batch of PRs that split the docs by area (10 files changed, 395 insertions(+), 570 deletions(-)). --- 🤖 Built with AI assistance. |
||
|
|
4f7bddb640 |
fix(site/src/pages/TemplateBuilder): use a radio group for module category filters (#30523)
Fixes the axe `aria-valid-attr-value` violation reported in DEQ-288 on
the template builder's "Select modules" step.
The category filters were Radix `Tabs` with no `TabsContent`. Radix
`TabsTrigger` always sets `aria-controls` to `<baseId>-content-<value>`,
so the active "All" trigger pointed at an id that did not exist. (axe
skips `aria-controls` on tabs with `aria-selected="false"`, which is why
only the active one was flagged.)
The categories filter the same grid as the search field, so they are not
tabs and there is no panel per category. They now render as a Radix
`RadioGroup` (`role="radiogroup"` with `role="radio"` / `aria-checked`
items) labelled "Filter modules by category". Arrow keys move focus and
check the item, following the APG radio pattern. Keyboard focus shows
the same ring as `TabLink`. The styling matches the previous tabs;
computed colors, borders, padding, and positions are identical. The
shared `#/components/RadioGroup` wrapper renders a dot indicator, so
this uses the Radix primitive directly.
The `useKebabMenu` call is removed with the tabs. It was never wired up
here (no measure props and no overflow menu rendered), and the row
already wraps.
Verification:
- Ran axe-core 4.11 against the `Default` and `FilteredByCategory`
stories. On `main` it reports `aria-valid-attr-value` on
`#radix-…-trigger-All`. On this branch that violation is gone. The
remaining `nested-interactive` and `target-size` findings come from
`ModuleCard` and are out of scope.
- Keyboard check in Playwright: Tab lands on the checked radio,
ArrowRight/ArrowLeft check the adjacent category and filter the grid,
and Tab leaves the group in one stop. The focus ring shows on keyboard
focus only, not on mouse click.
- `pnpm test:storybook` for `ModuleSelectStep.stories.tsx` (5 passed),
`pnpm lint:types`, `pnpm check`, `pnpm lint`.
> 🤖 This PR was generated by Coder Agents on behalf of @aqandrew.
|
||
|
|
1872b183ee |
docs(docs/admin): reformat setup and integrations docs to one sentence per line (#30704)
Reformats the setup and integrations docs under `docs/admin/setup` and `docs/admin/integrations` to one sentence per line, as the [docs style guide](https://github.com/coder/coder/blob/main/docs/.style/style-guide/formatting.md#one-sentence-per-line) requires. Hard-wrapped paragraphs are unwrapped and lines holding several sentences are split, so a later edit to one sentence shows up as a one-line diff. Apart from the exception below, only whitespace inside paragraphs and list items changes, and the rendered pages are the same. Comparing the changed files against `main` word for word, ignoring whitespace and blockquote `>` markers, finds differences only on the reworded lines. `git diff --word-diff` is easier to read than the line diff. 1 lines that already contained an em or en dash were reworded by hand, because `lint/emdash` treats every reflowed line as newly added. Each uses a parenthetical, a separate sentence, or a colon after a lead-in. Dashes on lines the reflow did not touch are left alone. Applied with an in-progress formatter, limited to pages listed in `docs/manifest.json` and excluding generated reference docs. This is one of a batch of PRs that split the docs by area (25 files changed, 380 insertions(+), 572 deletions(-)). --- 🤖 Built with AI assistance. |
||
|
|
238a476e9a |
chore: bump github.com/hashicorp/terraform-json from 0.28.0 to 0.29.0 (#30774)
Bumps [github.com/hashicorp/terraform-json](https://github.com/hashicorp/terraform-json) from 0.28.0 to 0.29.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/hashicorp/terraform-json/releases">github.com/hashicorp/terraform-json's releases</a>.</em></p> <blockquote> <h2>v0.29.0</h2> <p>ENHANCEMENTS:</p> <ul> <li>version: Allow parsing of a <code>format_version</code> field, added in Terraform 1.17 (<a href="https://redirect.github.com/hashicorp/terraform-json/pull/208">#208</a>)</li> <li>Add <code>init_output</code> log type for use when parsing logs from the <code>init</code> command (<a href="https://redirect.github.com/hashicorp/terraform-json/pull/181">#181</a>)</li> <li>logging: Add support for <code>state migrate</code> message types (<a href="https://redirect.github.com/hashicorp/terraform-json/pull/210">#210</a>)</li> <li>Add support for JSON output from <code>workspace list</code> command (<a href="https://redirect.github.com/hashicorp/terraform-json/pull/198">#198</a>)</li> <li>Enable parsing <code>state_store_initialization_start</code> JSON log message from <code>init</code> command (<a href="https://redirect.github.com/hashicorp/terraform-json/pull/212">#212</a>)</li> </ul> <p>BUG FIXES:</p> <ul> <li>Avoid panic in <code>(WorkspaceListOutput) CurrentWorkspace</code> if no workspaces are listed (<a href="https://redirect.github.com/hashicorp/terraform-json/pull/214">#214</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/hashicorp/terraform-json/commit/8f4894d138d0fe71436cba6dbc8f16577e9a9e7d"><code>8f4894d</code></a> fix: Avoid panic in <code>(WorkspaceListOutput) CurrentWorkspace</code> if no workspaces...</li> <li><a href="https://github.com/hashicorp/terraform-json/commit/540e4c2dd221e4b115258ea0a3a8c8fc24bb3b03"><code>540e4c2</code></a> test: Enable parsing <code>state_store_initialization_start </code> JSON message, add te...</li> <li><a href="https://github.com/hashicorp/terraform-json/commit/456fd358731ed4d6fc2e30f6e6a12d6532761682"><code>456fd35</code></a> refactor: Rename JSON message type constants to use <code>Message</code> prefix in name ...</li> <li><a href="https://github.com/hashicorp/terraform-json/commit/ebdaf2c44e73a2f66e3e048dc6b9b73846a8a7bd"><code>ebdaf2c</code></a> logging: Add support for <code>state migrate</code> message types (<a href="https://redirect.github.com/hashicorp/terraform-json/issues/210">#210</a>)</li> <li><a href="https://github.com/hashicorp/terraform-json/commit/5a1ca9230975ec15a9885e4a35b755646fda3028"><code>5a1ca92</code></a> Add support for JSON output from <code>workspace list</code> (<a href="https://redirect.github.com/hashicorp/terraform-json/issues/198">#198</a>)</li> <li><a href="https://github.com/hashicorp/terraform-json/commit/e0b680713a97433a2b3aff9395516bded146210b"><code>e0b6807</code></a> feat: Add <code>init_output</code> log type for use when parsing a subset of logs from t...</li> <li><a href="https://github.com/hashicorp/terraform-json/commit/1835ed6fbee33db47013369b2f0dff44655894ef"><code>1835ed6</code></a> version: Allow parsing of a format_version field, added in v1.17 (<a href="https://redirect.github.com/hashicorp/terraform-json/issues/208">#208</a>)</li> <li><a href="https://github.com/hashicorp/terraform-json/commit/f4ef9969cba17897dc68940e97b0f3f203807630"><code>f4ef996</code></a> build(deps): bump actions/checkout from 7.0.0 to 7.0.1 in the github-actions-...</li> <li><a href="https://github.com/hashicorp/terraform-json/commit/4a96b30be8a74ee37652aebdaadfbeefaab2de52"><code>4a96b30</code></a> build(deps): bump actions/setup-go from 6.5.0 to 7.0.0 in the github-actions-...</li> <li>See full diff in <a href="https://github.com/hashicorp/terraform-json/compare/v0.28.0...v0.29.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |