Commit Graph

1547 Commits

Author SHA1 Message Date
06e5d9ef21 feat(coderd): add webpush package (#17091)
* Adds `codersdk.ExperimentWebPush` (`web-push`)
* Adds a `coderd/webpush` package that allows sending native push
notifications via `github.com/SherClockHolmes/webpush-go`
* Adds database tables to store push notification subscriptions.
* Adds an API endpoint that allows users to subscribe/unsubscribe, and
send a test notification (404 without experiment, excluded from API docs)
* Adds server CLI command to regenerate VAPID keys (note: regenerating
the VAPID keypair requires deleting all existing subscriptions)

---------

Co-authored-by: Kyle Carberry <kyle@carberry.com>
2025-03-27 10:03:53 +00:00
6bb4bdb9cb docs: add troubleshooting section to Desktop docs (#17098)
[preview](https://coder.com/docs/@121-desktop-troubleshoot/user-guides/desktop)

relates to https://github.com/coder/coder-desktop-macos/issues/121

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Ethan <39577870+ethanndickson@users.noreply.github.com>
2025-03-26 19:00:32 +00:00
17ddee05e5 chore: update golang to 1.24.1 (#17035)
- Update go.mod to use Go 1.24.1
- Update GitHub Actions setup-go action to use Go 1.24.1
- Fix linting issues with golangci-lint by:
  - Updating to golangci-lint v1.57.1 (more compatible with Go 1.24.1)

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <claude@anthropic.com>
2025-03-26 01:56:39 -05:00
56082f3b83 feat(cli): start workspace in no-wait mode (#17087)
Fixes: https://github.com/coder/coder/issues/16408
2025-03-25 13:54:53 +01:00
cd19e79d9b chore: enable coder inbox by default (#17077)
Add a flag to enable Coder Inbox by default, as well as supporting disabling the feature.
2025-03-25 12:51:26 +00:00
4c33846f6d chore: add prebuilds system user (#16916)
Pre-requisite for https://github.com/coder/coder/pull/16891

Closes https://github.com/coder/internal/issues/515

This PR introduces a new concept of a "system" user.

Our data model requires that all workspaces have an owner (a `users`
relation), and prebuilds is a feature that will spin up workspaces to be
claimed later by actual users - and thus needs to own the workspaces in
the interim.

Naturally, introducing a change like this touches a few aspects around
the codebase and we've taken the approach _default hidden_ here; in
other words, queries for users will by default _exclude_ all system
users, but there is a flag to ensure they can be displayed. This keeps
the changeset relatively small.

This user has minimal permissions (it's equivalent to a `member` since
it has no roles). It will be associated with the default org in the
initial migration, and thereafter we'll need to somehow ensure its
membership aligns with templates (which are org-scoped) for which it'll
need to provision prebuilds; that's a solution we'll have in a
subsequent PR.

---------

Signed-off-by: Danny Kopping <dannykopping@gmail.com>
Co-authored-by: Sas Swart <sas.swart.cdk@gmail.com>
2025-03-25 12:18:06 +00:00
081679f431 fix: display force-tty flag (#17067)
Fixes: https://github.com/coder/coder/issues/17033
2025-03-25 10:25:35 +01:00
4983150ab9 docs: add a table to feature stages doc (#17080)
adds a table to the feature stages doc to summarize the stages + links
to the heading below for more info


[preview](https://coder.com/docs/@feature-stages-table/about/feature-stages)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-03-24 22:28:02 -04:00
82e37732ea feat(coderd): add format option to inbox notifications watch endpoint (#17034)
This PR aims to allow clients to use different format for the title and
content of inbox notifications - on the watch endpoint.

This solution will help to have it working and formatted differently on
VSCode, WebUI ...
[Related to this issue](https://github.com/coder/internal/issues/523)
2025-03-21 16:41:13 +01:00
0474888eb4 feat(cli): add open app <workspace> <app-slug> command (#17032)
Fixes https://github.com/coder/coder/issues/17009

Adds a CLI command `coder open app <workspace> <app-slug>` that allows
opening arbitrary `coder_apps` via the CLI.

Users can optionally specify a region for workspace
applications.
2025-03-21 15:28:08 +00:00
bbe7dacd35 docs: document definition of workspace activity (#16941)
closes: https://github.com/coder/coder/issues/16884

aligns the documentation with what users see when they adjust settings
and uses the [notion
discussion](https://www.notion.so/coderhq/Definitions-of-Workspace-Usage-Autostop-Dormancy-e7fa8ff782a948c19bbe4ef8315c26cb)
as a reference. This PR reflects current behavior from what I can tell.


[preview](https://coder.com/docs/@16884-define-activity/user-guides/workspace-scheduling#activity-detection)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-03-21 10:36:24 -04:00
a71aa202dc feat: filter users by github user id in the users list CLI command (#17029)
Add the `--github-user-id` option to `coder users list`, which makes the
command only return users with a matching GitHub user id. This will
enable https://github.com/coder/start-workspace-action to find a Coder
user that corresponds to a GitHub user requesting to start a workspace.
2025-03-21 13:30:47 +01:00
69ba27e347 feat: allow specifying devcontainer on agent in terraform (#16997)
This change allows specifying devcontainers in terraform and plumbs it
through to the agent via agent manifest.

This will be used for autostarting devcontainers in a workspace.

Depends on coder/terraform-provider-coder#368
Updates #16423
2025-03-20 19:09:39 +02:00
4960a1e85a feat(coderd): add mark-all-as-read endpoint for inbox notifications (#16976)
[Resolve this issue](https://github.com/coder/internal/issues/506)

Add a mark-all-as-read endpoint which is marking as read all
notifications that are not read for the authenticated user.
Also adds the DB logic.
2025-03-20 13:41:54 +01:00
c88d86bf50 docs: add new doc on how to deploy Coder on Rancher (#16534)
[preview](https://coder.com/docs/@deploy-on-rancher/install/rancher)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-03-19 18:50:52 +00:00
bd243c17fb docs: add AWS AMI upgrade instructions (#16973)
followup to @d1str0's #16937 

> Adds a small note for those who just used the AWS AMI for their
initial installation.

This PR rearranges the Upgrade doc to use tabs for each section + adds
AWS AMI

[preview](https://coder.com/docs/@upgrade-tabs/install/upgrade)

---------

Co-authored-by: Brady Sullivan <brady@bsull.com>
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-03-19 10:10:58 -04:00
3ac844ad3d chore(codersdk): rename WorkspaceAgent(Dev)container structs (#16996)
This is to free up the devcontainer name space for more targeted
structs.

Updates #16423
2025-03-19 10:16:14 +00:00
75b27e8f19 fix(agent/agentcontainers): improve testing of convertDockerInspect, return correct host port (#16887)
* Improves separation of concerns between `runDockerInspect` and
`convertDockerInspect`: `runDockerInspect` now just runs the command and
returns the output, while `convertDockerInspect` now does all of the
conversion and parsing logic.
* Improves testing of `convertDockerInspect` using real test fixtures.
* Fixes issue where the container port is returned instead of the host
port.
* Updates UI to link to correct host port. Container port is still
displayed in the button text, but the HostIP:HostPort is shown in a
popover.
* Adds stories for workspace agent UI
2025-03-18 14:37:45 +00:00
3ae55bbbf4 feat(coderd): add inbox notifications endpoints (#16889)
This PR is part of the inbox notifications topic, and rely on previous
PRs merged - it adds :

- Endpoints to : 
  - WS : watch new inbox notifications
  - REST : list inbox notifications
  - REST : update the read status of a notification

Also, this PR acts as a follow-up PR from previous work and : 

- fix DB query issues
- fix DBMem logic to match DB
2025-03-18 00:02:47 +01:00
8ca52a835e docs: document steps for adding cert to JetBrains plugin settings (#16882)
- document the steps from @stirby in ticket
- separate the different OSs in a way that's easier to look at
- fix typo


[preview](https://coder.com/docs/@593-ca-cert-plugin/user-guides/workspace-access/jetbrains#configuring-the-gateway-plugin-to-use-internal-certificates)

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-03-17 17:11:36 -04:00
ffd336b9ad docs: adjust order of options in external-auth (#16943)
from @NickSquangler 

> ($customer) noticed when setting up external auth with Gitlab that the
command listed in the docs is in the incorrect order, as `coder
external-auth <USER_DEFINED_ID> access-token` should be `coder
external-auth access-token <USER_DEFINED_ID>`


[preview](https://coder.com/docs/@external-auth-access-token/admin/external-auth#workspace-cli)

<details><summary>coder external-auth access-token --help</summary>

```shell
coder external-auth access-token --help
coder v2.20.0+03b5012

USAGE:
  coder external-auth access-token [flags] <provider>

  Print auth for an external provider

  Print an access-token for an external auth provider. The access-token will be validated and sent
  to stdout with exit code 0. If a valid access-token cannot be obtained, the URL to authenticate
  will be sent to stdout with exit code 1
    - Ensure that the user is authenticated with GitHub before cloning.:

        $ #!/usr/bin/env sh

  OUTPUT=$(coder external-auth access-token github)
  if [ $? -eq 0 ]; then
    echo "Authenticated with GitHub"
  else
    echo "Please authenticate with GitHub:"
    echo $OUTPUT
  fi


    - Obtain an extra property of an access token for additional metadata.:

        $ coder external-auth access-token slack --extra "authed_user.id"


OPTIONS:
      --extra string
          Extract a field from the "extra" properties of the OAuth token.

———
Run `coder --help` for a list of global options.
```

</details>

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-03-14 17:17:34 -04:00
a2131a7616 docs: add cgroup memory troubleshooting to install doc (#16920)
originally thought this fit under [Unofficial Install
Methods](https://coder.com/docs/install/other), but we don't talk about
Raspberry Pi anywhere, so ~the general Install doc might be a better
fit~ moved to admin>templates>troubleshooting


[preview](https://coder.com/docs/@3-cgroup-mem/admin/templates/troubleshooting#coder-on-raspberry-pi-os)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: M Atif Ali <atif@coder.com>
2025-03-14 19:58:01 +00:00
7ba4df1bc4 docs: fix offline dockerfile bug (#16923)
bug caused via the `apk del terraform` line in our Dockerfile, which
does not yet exist in the Alpine Linux OS.

removing this line (18) results in successful builds.
2025-03-14 12:11:14 -04:00
cf7d143e43 docs: use consistent examples in prometheus doc and add namespaceSelector spec (#16918)
closes: #15385 

- use consistent `prom-http` port (@johnstcn looks like this was
changed/added in #12214 - do we prefer `prom-http` over
`prometheus-http` or is it more important that they align?)
- add `namespaceSelector:` per @francisco-mata (thanks! - sorry it took
so long to get this in)

   from issue:

> For some reason our target was not appearing on our prometheus
targets, we had to add a namespaceSelector key on the Service Monitor to
successfully appear

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-03-13 22:09:26 -04:00
4994ba1e60 docs: remove broken gfm alert (#16902)
It looks like GFM does not respect the `![]` alert syntax (and any other
alert type) when it's enclosed within a div. This is true for both the
coder.com GFM renderer, and GitHub's (though I assume they're the same
internally).

When the section is surrounded by a `<div class="tabs">`:

![image](https://github.com/user-attachments/assets/0f7d4029-a0a5-4d38-a489-f3b893c68dd8)

When it's not:

![image](https://github.com/user-attachments/assets/765d3629-0108-43cc-8047-972dfd806c7d)

In our case, we really want the tabs, and the alert block is less
important, so we'll downgrade it to a regular quote.

cc @aqandrew for visibility, in case you're aware of a workaround.
2025-03-13 16:13:02 +11:00
f899832c02 docs: add warning for multiple Coder Desktop mac installations (#16888)
I realised we should advise against installing multiple copies, as I'm sure someone will try and get confused by Apple's obtuse error messaging.

Tailscale also has a similar warning: https://pkgs.tailscale.com/stable/#macos
2025-03-13 14:45:37 +11:00
101b62dc3e docs: convert alerts to use GitHub Flavored Markdown (GFM) (#16850)
followup to #16761 

thanks @lucasmelin !

+ thanks: @ethanndickson @Parkreiner @matifali @aqandrew 

- [x] update snippet
- [x] find/replace
- [x] spot-check


[preview](https://coder.com/docs/@16761-gfm-callouts/admin/templates/managing-templates/schedule)
(and others)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: M Atif Ali <atif@coder.com>
2025-03-10 16:58:20 -04:00
8c0350e20c feat: add a paginated organization members endpoint (#16835)
Closes
[coder/internal#460](https://github.com/coder/internal/issues/460)
2025-03-10 14:42:07 -04:00
4b1da9b896 feat(cli): preserve table column order (#16843)
Fixes: https://github.com/coder/coder/issues/16055
2025-03-10 12:28:06 +00:00
db064ed0f8 docs: fix formatting of note callouts (#16761)
Fixes the formatting of several note callouts. Previously, these would render incorrectly both on GitHub and on the documentation site.
2025-03-07 10:35:14 -05:00
9bed9a226a docs: update versions in offline installation docs (#16808)
[preview](https://coder.com/docs/@matifali-patch-1/install/offline)

---------

Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
2025-03-06 21:35:41 +05:00
f5aac64119 docs: add beta label to workspace presets (#16826)
thanks @ssncoder!


[preview](https://coder.com/docs/@workspace-presets-beta/admin/templates/extending-templates/parameters#workspace-presets)

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-03-06 09:09:15 -05:00
32450a2f77 docs: update docs for 2.20 release (#16817)
Updates Helm chart versions and updating support statuses for various
versions.
2025-03-06 01:54:26 +05:00
9041646b81 chore: add "user_configs" db table (#16564) 2025-03-05 10:46:03 -07:00
0913594bfc docs: document workspace presets feature (#16612)
closes #16475 

relates to #16304 

- [x] reword opening sentence to clarify where this is done
   - I think this is set because it's under parameters now
- [x] list of configurable settings
   - same as above
- [x] (optional) screenshot



[preview](https://coder.com/docs/@16475-workspace-presets/admin/templates/extending-templates/parameters#workspace-presets)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-03-05 14:43:20 +05:00
9251e0d642 docs: add oom/ood to notifications (#16582)
- [x] add section or to another section: where the notifications show
up/how to access

previews:
- [Notifications - Configure OOM/OOD
notifications](https://coder.com/docs/@16581-oom-ood-notif/admin/monitoring/notifications#configure-oomood-notifications)
- [Resource
monitoring](https://coder.com/docs/@16581-oom-ood-notif/admin/templates/extending-templates/resource-monitoring)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-03-05 14:43:08 +05:00
73057eb7bd docs: add Coder Desktop early preview documentation (#16544)
closes #16540 
closes https://github.com/coder/coder-desktop-macos/issues/75

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: M Atif Ali <atif@coder.com>
Co-authored-by: Ethan Dickson <ethan@coder.com>
Co-authored-by: Dean Sheather <dean@deansheather.com>
2025-03-04 22:26:59 +05:00
0f4f6bd147 docs: describe default sign up behavior with GitHub (#16765)
Document the sign up behavior with the default GitHub OAuth2 app.
2025-03-03 13:23:12 +01:00
9c5d4966ee docs: suggest disabling the default GitHub OAuth2 provider on k8s (#16758)
For production deployments we recommend disabling the default GitHub
OAuth2 app managed by Coder. This PR mentions it in k8s installation
docs and the helm README so users can stumble upon it more easily.
2025-03-03 12:32:27 +01:00
a5842e5ad1 docs: document default GitHub OAuth2 configuration and device flow (#16663)
Document the changes made in https://github.com/coder/coder/pull/16629
and https://github.com/coder/coder/pull/16585.
2025-03-03 12:31:56 +01:00
c074f77a4f feat: add notifications inbox db (#16599)
This PR is linked [to the following
issue](https://github.com/coder/internal/issues/334).

The objective is to create the DB layer and migration for the new `Coder
Inbox`.
2025-03-03 10:12:48 +01:00
fc2815cfdb docs: fix anchor and repo links (#16555)
Some checks are pending
ci / changes (push) Waiting to run
ci / lint (push) Blocked by required conditions
ci / gen (push) Waiting to run
ci / fmt (push) Blocked by required conditions
ci / test-go (macos-latest) (push) Blocked by required conditions
ci / test-go (ubuntu-latest) (push) Blocked by required conditions
ci / test-go (windows-2022) (push) Blocked by required conditions
ci / test-cli (macos-latest) (push) Blocked by required conditions
ci / test-cli (windows-2022) (push) Blocked by required conditions
ci / test-go-pg (ubuntu-latest) (push) Blocked by required conditions
ci / test-go-pg-16 (push) Blocked by required conditions
ci / test-go-race (push) Blocked by required conditions
ci / test-go-race-pg (push) Blocked by required conditions
ci / test-go-tailnet-integration (push) Blocked by required conditions
ci / test-js (push) Blocked by required conditions
ci / test-e2e (push) Blocked by required conditions
ci / test-e2e-premium (push) Blocked by required conditions
ci / chromatic (push) Blocked by required conditions
ci / offlinedocs (push) Blocked by required conditions
ci / required (push) Blocked by required conditions
ci / build-dylib (push) Blocked by required conditions
ci / build (push) Blocked by required conditions
ci / deploy (push) Blocked by required conditions
ci / deploy-wsproxies (push) Blocked by required conditions
ci / sqlc-vet (push) Blocked by required conditions
ci / notify-slack-on-failure (push) Blocked by required conditions
Docs CI / docs (push) Waiting to run
OpenSSF Scorecard / Scorecard analysis (push) Waiting to run
2025-03-02 09:55:36 -06:00
91a4a98c27 chore: add an unassign action for roles (#16728) 2025-02-27 10:39:06 -07:00
b3d675532f docs: copy edit early access section in feature-stages doc (#16730)
- copy edit EA section with @mattvollmer 's suggestions
- ran the script that updates the list of experiments

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-02-27 09:20:03 +05:00
5cdc13ba9e docs: fix broken links in feature-stages (#16727)
fix broken links introduced by #16719

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-02-26 22:42:46 +00:00
81ef9e9e80 docs: document new feature stages (#16719)
- [x] translate notes to docs
- [x] move to Home > About > Feature Stages
- [x] decide on bullet point summaries (👍 👎  in comment)

### OOS for this PR

add support page that describes how users can get support. currently,
[this help
article](https://help.coder.com/hc/en-us/articles/25308666965783-Get-Help-with-Coder)
is the only thing that pops up and includes that `Users with valid Coder
licenses can submit tickets` but doesn't show how, nor does it include
the support bundle docs (link or content). it'd be good to have these
things relate to each other

## preview


[preview](https://coder.com/docs/@feature-stages/contributing/feature-stages)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Ben Potter <ben@coder.com>
2025-02-26 15:43:02 -05:00
5295902596 docs: clarified prometheus integration behavior (#16724)
Closes issue #16538 
Updated docs to explain Behavior of enabling Prometheus
2025-02-26 19:30:41 +00:00
7cd6e9cdd6 fix: return provisioners in desc order and add limit to cli (#16720) 2025-02-26 21:06:51 +02:00
6acc3a9469 docs: update the quickstart page (#16666)
## Changes
1. Update the `0.0.0.0:3001` web UI address to `localhost:3000`. Coder
starts on port 3000 by default. It'd use 3001 only if 3000 was already
taken.
2. Update the screenshot of the `/setup` page to reflect how it will
look like after merging https://github.com/coder/coder/pull/16662. Note:
this PR should be merged only after the other one is.
3. Minor phrasing changes.

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-02-25 16:32:20 +01:00
d3a56ae3ef feat: enable GitHub OAuth2 login by default on new deployments (#16662)
Third and final PR to address
https://github.com/coder/coder/issues/16230.

This PR enables GitHub OAuth2 login by default on new deployments.
Combined with https://github.com/coder/coder/pull/16629, this will allow
the first admin user to sign up with GitHub rather than email and
password.

We take care not to enable the default on deployments that would upgrade
to a Coder version with this change.

To disable the default provider an admin can set the
`CODER_OAUTH2_GITHUB_DEFAULT_PROVIDER` env variable to false.
2025-02-25 16:31:33 +01:00