Skip to content

[pull] main from coder:main #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 205 commits into from
May 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
ec003b7
fix: update default value handling for dynamic defaults (#17609)
jaaydenh May 6, 2025
ebad5c3
test(agent): fix channel timeout in TestNewServer_CloseActiveConnecti…
mafredri May 6, 2025
5f516ed
feat: improve coder connect tunnel handling on reconnect (#17598)
ibetitsmike May 6, 2025
d9b00e4
feat: add inline actions into workspaces table (#17636)
BrunoQuaresma May 6, 2025
a7e8285
chore: retry failing tests in CI (#17681)
hugodutka May 6, 2025
4fa9d30
refactor: update app buttons to use the new button component (#17684)
BrunoQuaresma May 6, 2025
df0c6ed
chore: add custom aider icon (#17682)
DevelopmentCats May 6, 2025
d146115
chore: update browser list db (#17699)
BrunoQuaresma May 7, 2025
9fe5b71
chore!: fix workspace apps response (#17700)
BrunoQuaresma May 7, 2025
6ac1bd8
feat: display builtin apps on workspaces table (#17695)
BrunoQuaresma May 7, 2025
29bce8d
feat(cli): make MCP server work without user authentication (#17688)
ThomasK33 May 7, 2025
a02ba66
fix: fill session token when app is external (#17708)
BrunoQuaresma May 7, 2025
e4c6c10
chore: fix comment regarding provisioner api version release (#17705)
Emyrk May 7, 2025
b6182fe
chore: add code-insiders.svg static icon (#17716)
deansheather May 8, 2025
c66e80e
fix: extract checkbox label from dynamic parameter styling prop (#17651)
jaaydenh May 8, 2025
2695f4e
chore: improve variable names of mocked users (#17701)
BrunoQuaresma May 8, 2025
4341403
chore: simplify workspaces data fetching (#17703)
BrunoQuaresma May 8, 2025
857587b
fix: do not share token with http app urls (#17720)
BrunoQuaresma May 8, 2025
1bb96b8
fix: resolve flake test on manager (#17702)
defelmnq May 8, 2025
c5c3a54
fix: create ssh directory if it doesn't already exist when running `c…
brettkolodny May 8, 2025
0b141c4
chore: add DynamicParameter stories (#17710)
jaaydenh May 8, 2025
d93a9cf
feat: add TagInput component for dynamic parameters (#17719)
jaaydenh May 8, 2025
d5360a6
chore: fetch workspaces by username with organization permissions (#1…
Emyrk May 8, 2025
9a052e2
fix: use file filter in weekly-docs github action (#17729)
EdwardAngert May 8, 2025
ae3d90b
fix: persist terraform modules during template import (#17665)
aslilac May 8, 2025
a9f1a6b
fix: revert fix: persist terraform modules during template import (#1…
sreya May 9, 2025
58adc62
chore: add prebuild docs (#17580)
dannykopping May 9, 2025
2696926
fix: fixed flaking VPN tunnel tests & bump coder/quartz to 0.1.3 (#17…
ibetitsmike May 9, 2025
f897981
chore: extract app access logic for reuse (#17724)
BrunoQuaresma May 9, 2025
2bdd035
chore: add keys for each app on workspaces table (#17726)
BrunoQuaresma May 9, 2025
902c34c
refactor: improve apps.ts readbility (#17741)
BrunoQuaresma May 9, 2025
0b8fd7e
chore: fix :first-child warning (#17727)
BrunoQuaresma May 9, 2025
9d7630b
chore: replace MUI icons - 1 (#17731)
BrunoQuaresma May 9, 2025
3ee95f1
chore: upgrade `terraform-provider-coder` & `preview` libs (#17738)
dannykopping May 9, 2025
5c53277
docs: clarify parameter autofill documentation (#17728)
EdwardAngert May 9, 2025
9e44f18
refactor: add safe list for external app protocols (#17742)
BrunoQuaresma May 9, 2025
b0a4ef0
chore: replace MUI icons - 2 (#17732)
BrunoQuaresma May 9, 2025
aa4b764
chore: replace MUI icons - 3 (#17733)
BrunoQuaresma May 9, 2025
4970fb9
chore: replace MUI icons - 4 (#17748)
BrunoQuaresma May 9, 2025
1adad41
feat: display user apps in the workspaces table (#17744)
BrunoQuaresma May 9, 2025
842bb1f
chore: replace MUI icons - 6 (#17751)
BrunoQuaresma May 9, 2025
bd65914
docs: add note about experiment_report_tasks to ai-coder/create-templ…
EdwardAngert May 9, 2025
7af188b
fix(agent): fix unexpanded devcontainer paths for agentcontainers (#1…
mafredri May 12, 2025
87152db
ci: bump the github-actions group across 1 directory with 4 updates (…
dependabot[bot] May 12, 2025
4f1df34
chore: bump github.com/mark3labs/mcp-go from 0.25.0 to 0.27.0 (#17762)
dependabot[bot] May 12, 2025
0832afb
chore: bump gopkg.in/DataDog/dd-trace-go.v1 from 1.72.1 to 1.73.0 (#1…
dependabot[bot] May 12, 2025
345a239
chore: bump github.com/open-policy-agent/opa from 1.3.0 to 1.4.2 (#17…
dependabot[bot] May 12, 2025
799a0ba
chore: bump github.com/valyala/fasthttp from 1.61.0 to 1.62.0 (#17766)
dependabot[bot] May 12, 2025
af2941b
feat: add `is_prebuild_claim` to distinguish post-claim provisioning …
dannykopping May 12, 2025
3783241
chore: resolve internal drpc package conflict (#17770)
Emyrk May 12, 2025
ea2cae0
chore: tune postgres CI tests (#17756)
hugodutka May 12, 2025
e0dd50d
chore(cli): fix test flake in TestExpMcpServer (#17772)
johnstcn May 12, 2025
15bd7a3
chore: replace MUI icons with Lucide icons - 5 (#17750)
BrunoQuaresma May 12, 2025
578b9ff
fix: enrich the `notLoggedInMessage` error message with the full path…
cstyan May 12, 2025
10b44a5
fix: use monochrome zed icon (#17774)
aslilac May 12, 2025
d0ab91c
fix: reduce size of terraform modules archive (#17749)
aslilac May 12, 2025
398b999
chore: pass previous values into terraform apply (#17696)
Emyrk May 12, 2025
0b5f27f
feat: add `parent_id` column to `workspace_agents` table (#17758)
DanielleMaywood May 12, 2025
7f056da
feat: add hidden `CODER_AGENT_IS_SUB_AGENT` flag to `coder agent` (#1…
DanielleMaywood May 13, 2025
599bb35
fix(coderd): list templates returns non-deprecated templates by defau…
ssncferreira May 13, 2025
b0788f4
chore: rename "Test Notification" to "Troubleshooting Notification" (…
DanielleMaywood May 13, 2025
02425ee
chore: replace MUI icons with Lucide icons - 7 (#17776)
BrunoQuaresma May 13, 2025
eb9a651
chore: replace MUI icons with Lucide icons - 8 (#17778)
BrunoQuaresma May 13, 2025
86da21c
chore: replace MUI icons with Lucide icons - 10 (#17797)
BrunoQuaresma May 13, 2025
8f64d49
chore: update alpine 3.21.2 => 3.21.3 (#17773)
angrycub May 13, 2025
a1c03b6
feat: add experimental Chat UI (#17650)
johnstcn May 13, 2025
64807e1
chore: apply the 4mb max limit on drpc protocol message size (#17771)
Emyrk May 13, 2025
709445e
chore: replace MUI icons with Lucide icons - 9 (#17796)
BrunoQuaresma May 13, 2025
b2a1de9
feat: fetch prebuilds metrics state in background (#17792)
dannykopping May 13, 2025
ef745c0
chore: optimize workspace_latest_builds view query (#17789)
deansheather May 13, 2025
170f41a
chore: fix release calendar and script (#17745)
matifali May 13, 2025
f9817af
docs: add section on how to retrieve user list (#17798)
EdwardAngert May 13, 2025
60762d4
feat: load terraform modules when using dynamic parameters (#17714)
aslilac May 13, 2025
67e4024
feat: add extra workspace actions in the workspaces table (#17775)
BrunoQuaresma May 13, 2025
c718392
fix: don't open a window for external apps (#17813)
BrunoQuaresma May 14, 2025
f87dbe7
chore: replace MUI icons with Lucide icons - 11 (#17814)
BrunoQuaresma May 14, 2025
80e1be0
fix: replace wrong emoji reference (#17810)
BrunoQuaresma May 14, 2025
fcbdd1a
refactor: replace badge by status indicator (#17811)
BrunoQuaresma May 14, 2025
425ee6f
feat: reinitialize agents when a prebuilt workspace is claimed (#17475)
SasSwart May 14, 2025
c7bc404
chore: replace MUI LoadingButton with Button + Spinner - 1 (#17816)
BrunoQuaresma May 14, 2025
e75d1c1
chore: replace MUI LoadingButton with Button + Spinner - 2 (#17817)
BrunoQuaresma May 14, 2025
6e96778
feat: track resource replacements when claiming a prebuilt workspace …
dannykopping May 14, 2025
df56a13
chore: replace MUI icons with Lucide icons - 12 (#17815)
BrunoQuaresma May 14, 2025
74934e1
docs: add file sync to coder desktop docs (#17463)
EdwardAngert May 14, 2025
4d00b76
chore: bump github.com/justinas/nosurf from 1.1.1 to 1.2.0 (#17829)
dependabot[bot] May 14, 2025
f3bcac2
refactor: improve overlayFS errors (#17808)
aslilac May 14, 2025
789c4be
chore: add dynamic parameter error if missing metadata from provision…
Emyrk May 14, 2025
9093dbc
feat: hide hidden and non-healthy apps in the workspaces table (#17830)
brettkolodny May 14, 2025
73251cf
chore: add documentation to the coder ssh command regarding feature p…
brettkolodny May 14, 2025
35a04c7
refactor: use the new Table component for the Templates table (#17838)
BrunoQuaresma May 14, 2025
b6d72c8
chore: replace MUI LoadingButton - 4 (#17834)
BrunoQuaresma May 15, 2025
eb6412a
refactor(agent/agentcontainers): update routes and locking in contain…
mafredri May 15, 2025
522c178
fix(agent/agentcontainers): always use /bin/sh for devcontainer autos…
mafredri May 15, 2025
f2edcf3
fix: add missing clause for tracking replacements (#17849)
dannykopping May 15, 2025
2aa8cbe
fix: exclude deleted templates from metrics collection (#17839)
evgeniy-scherbina May 15, 2025
6e1ba75
chore: retry failed race tests in CI (#17846)
hugodutka May 15, 2025
3de0003
feat(agent): send devcontainer CLI logs during recreate (#17845)
mafredri May 15, 2025
c42a315
docs: add dev containers to manifest.json (#17854)
EdwardAngert May 15, 2025
ee2aeb4
fix: avoid pulling containers when it is not enabled (#17855)
BrunoQuaresma May 15, 2025
1bacd82
feat: add API key scope to restrict access to user data (#17692)
ThomasK33 May 15, 2025
ba6690f
fix: show no provisioners warning (#17835)
BrunoQuaresma May 15, 2025
6ff6e95
chore: replace MUI icons with Lucide icons - 13 (#17831)
BrunoQuaresma May 15, 2025
257500c
chore: replace MUI icons with Lucide icons - 14 (#17832)
BrunoQuaresma May 15, 2025
9beaca8
chore: replace MUI LoadingButton - 3 (#17833)
BrunoQuaresma May 15, 2025
bb6b96f
feat: add elixir icon (#17848)
TomBeckett May 15, 2025
bbceebd
chore: remove @mui/lab (#17857)
BrunoQuaresma May 15, 2025
2c49fd9
feat: add copy button for workspace name in breadcrumb (#17822)
matifali May 15, 2025
952c254
fix: fix duplicated agent logs (#17806)
BrunoQuaresma May 15, 2025
3011eca
chore: replace MUI icons with Lucide icons - 16 (#17862)
BrunoQuaresma May 15, 2025
9063b67
chore: improve style of dynamic parameters diagnostics (#17863)
jaaydenh May 15, 2025
c2bc801
chore: add 'classic_parameter_flow' column setting to templates (#17828)
Emyrk May 15, 2025
ea63d27
chore: migrate spinner components (#17866)
BrunoQuaresma May 16, 2025
4ac4137
chore: replace MUI icons with Lucide icons - 15 (#17861)
BrunoQuaresma May 16, 2025
90e93a2
chore: fix agent tests on Windows 11 (#17631)
spikecurtis May 16, 2025
c7917ea
chore: expose original length when serving slim binaries (#17735)
deansheather May 16, 2025
cf98268
chore: push proto changes to `v1.6` (#17874)
dannykopping May 16, 2025
83df557
revert(agent): remove `CODER_AGENT_IS_SUB_AGENT` cli flag (#17875)
DanielleMaywood May 16, 2025
7f9ddd7
docs: remove link to closed Remote Desktop issue (#17881)
spikecurtis May 16, 2025
cb0f778
chore: update setup-ramdisk-action (#17883)
hugodutka May 16, 2025
2cd3f99
feat: add one shot commands to the coder ssh command (#17779)
brettkolodny May 16, 2025
fb0e3d6
chore: remove update release calendar job (#17884)
matifali May 16, 2025
f36fb67
chore: use static params when dynamic param metadata is missing (#17836)
Emyrk May 16, 2025
d564164
docs: update release calendar for 2.22 release (#17886)
matifali May 16, 2025
8914f7a
chore: improve prebuilds docs (#17850)
dannykopping May 16, 2025
f8f4dc6
feat: check for classic flow on the create workspace page (#17852)
jaaydenh May 16, 2025
87a1ebc
chore: replace MUI Button - 1 (#17865)
BrunoQuaresma May 16, 2025
d6cb9b4
feat: setup url autofill for dynamic parameters (#17739)
jaaydenh May 16, 2025
ac8591e
fix: add null check (#17896)
jaaydenh May 16, 2025
ca5a78a
chore: update preview to remove AsString panic on unknown fields (#17…
Emyrk May 17, 2025
1a41608
fix: stop extending API key access if OIDC refresh is available (#17878)
spikecurtis May 19, 2025
c775ea8
test: fix a race in TestReinit (#17902)
SasSwart May 19, 2025
98e2ec4
feat: show devcontainer dirty status and allow recreate (#17880)
mafredri May 19, 2025
3dbd424
fix(dogfood/coder): stop docker containers and prune system on shutdo…
mafredri May 19, 2025
84478bd
fix(dogfood/coder): add missing -f flag (#17906)
mafredri May 19, 2025
a07298a
ci: bump github/codeql-action from 3.28.17 to 3.28.18 in the github-a…
dependabot[bot] May 19, 2025
1a43458
chore: bump github.com/mark3labs/mcp-go from 0.27.0 to 0.28.0 (#17909)
dependabot[bot] May 19, 2025
9367ef1
chore: bump cloud.google.com/go/compute/metadata from 0.6.0 to 0.7.0 …
dependabot[bot] May 19, 2025
4e0fc6e
chore: bump github.com/hashicorp/terraform-json from 0.24.0 to 0.25.0…
dependabot[bot] May 19, 2025
766277c
fix: disable submit button on diagnostics error (#17900)
jaaydenh May 19, 2025
4412f19
fix: sync websocket params with form params (#17895)
jaaydenh May 19, 2025
87dc247
feat: fail CI when `pubsub.Publish` calls are found in db transaction…
dannykopping May 19, 2025
f044cc3
feat: add provisioner daemon name to provisioner jobs responses (#17877)
ssncferreira May 19, 2025
61f22a5
feat(agent): add `ParentId` to agent manifest (#17888)
DanielleMaywood May 19, 2025
ac7961a
feat: add Organization Provisioner Keys view (#17889)
johnstcn May 19, 2025
ca5f114
refactor: update cli auth page design (#17915)
BrunoQuaresma May 19, 2025
433f0be
fix: show provisioner name instead of key name in expanded Provisione…
johnstcn May 19, 2025
fe733af
chore: fix flake on useAgentLogs (#17919)
BrunoQuaresma May 19, 2025
358b641
chore: skip parameter resolution for dynamic params (#17922)
Emyrk May 19, 2025
0cac6a8
docs: add provisioner job state transition diagram (#17882)
ssncferreira May 19, 2025
1314dbd
docs: add new dynamic parameters information to parameters doc (#17653)
EdwardAngert May 19, 2025
cc53c4d
fix: fix devcontainer port button (#17924)
BrunoQuaresma May 19, 2025
9c00046
chore: expose use_classic_parameter_flow on workspace response (#17925)
Emyrk May 19, 2025
dc21016
fix: get presets working correctly with dynamic params (#17923)
jaaydenh May 19, 2025
e5758a1
fix(site): center `/cli-auth` on firefox (#17929)
ethanndickson May 20, 2025
613117b
chore: add presets with prebuilds to our dogfood template (#17933)
SasSwart May 20, 2025
769c9ee
feat: cancel stuck pending jobs (#17803)
ibetitsmike May 20, 2025
1267c9c
fix: ensure reason present for workspace autoupdated notification (#1…
DanielleMaywood May 20, 2025
93f17bc
fix: remove unnecessary user lookup in agent API calls (#17934)
ThomasK33 May 20, 2025
e76d58f
chore: disable parameter validatation for dynamic params for all tran…
Emyrk May 20, 2025
a123900
chore: remove coder/preview dependency from codersdk (#17939)
Emyrk May 20, 2025
b51c902
docs: add early access badge to devcontainers admin (#17937)
EdwardAngert May 20, 2025
55313cf
chore: add vsphere icon (#17936)
ggjulio May 20, 2025
b551a06
fix: correct environment variable name for MCP app status slug (#17948)
ThomasK33 May 20, 2025
1f54c36
docs: rename external-auth heading in setup doc (#17868)
EdwardAngert May 20, 2025
d2d2189
chore: reduce `ignore_changes` suggestion scope (#17947)
dannykopping May 20, 2025
3e7ff9d
chore(coderd/rbac): add `Action{Create,Delete}Agent` to `ResourceWork…
DanielleMaywood May 20, 2025
36224f2
chore: replace MUI icons with Lucide icons - 17 (#17957)
BrunoQuaresma May 21, 2025
cbbbb44
docs: explain coder:// link for RDP (#17901)
spikecurtis May 21, 2025
3654a49
feat: add Claude.md initial draft (#17785)
ibetitsmike May 21, 2025
818d4d0
chore: ignore 'session shutdown' yamux error in tests (#17964)
spikecurtis May 21, 2025
c6bece0
refactor: update provisioners column copy (#17949)
BrunoQuaresma May 21, 2025
b7462fb
feat: improve transaction safety in CompleteJob function (#17970)
ibetitsmike May 21, 2025
36d938f
fix: show diagnostics if there are no parameters (#17967)
jaaydenh May 21, 2025
3a6d5f5
fix: update textarea to fit content height and set a max height (#17946)
jaaydenh May 21, 2025
cb7ce18
feat: add experimental workspace parameters page for dynamic params (…
jaaydenh May 21, 2025
cbfe975
refactor: show unhealthy status on workspace status indicator (#17956)
BrunoQuaresma May 21, 2025
f35a1bc
chore: replace MUI Button - 3 (#17955)
BrunoQuaresma May 21, 2025
e1934fe
chore: replace MUI icons with Lucide icons - update 18 (#17958)
BrunoQuaresma May 21, 2025
53e8e9c
fix: reduce cost of prebuild failure (#17697)
evgeniy-scherbina May 21, 2025
a5234bf
chore: fix autoversion script and update experiments/docs to v2.22.1 …
bpmct May 22, 2025
1e1e6f3
fix: skip TestReinitializeAgent until we can adapt it for windows (#1…
SasSwart May 22, 2025
34494fb
chore: avoid depending on rbac in slim builds (#17959)
ethanndickson May 22, 2025
eb8013a
docs: add jetbrains toolbox steps (#17661)
EdwardAngert May 22, 2025
5a3a7fc
chore: add JetBrains Toolbox to docs manifest (#17986)
matifali May 22, 2025
f825477
fix: add timeouts to test telemetry snapshot (#17879)
hugodutka May 22, 2025
a0e229a
chore: run test-go-pg on macOS and Windows in regular CI (#17853)
hugodutka May 22, 2025
4cb35c4
docs: fix token create command (#17984)
matifali May 22, 2025
6f0defb
refactor: refactor activity in workspace page (#17980)
BrunoQuaresma May 22, 2025
13b41c2
chore: update preview to include required param diags (#17978)
Emyrk May 22, 2025
d6c14f3
feat(agent/agentcontainers): update containers periodically (#17972)
mafredri May 22, 2025
c777740
docs: add Bottlerocket section to rootless Podman (#17987)
krispage May 22, 2025
b4daf36
refactor: refactor activity column in the workspaces table (#17976)
BrunoQuaresma May 23, 2025
96f69b8
chore: set slim tag when compiling `coder-vpn.dylib` (#18001)
ethanndickson May 23, 2025
94c129c
fix!: omit name, avatar_url and last_seen_at from responses when empt…
BrunoQuaresma May 23, 2025
30a910b
chore: replace MUI Button - 2 (#17953)
BrunoQuaresma May 23, 2025
516fb44
feat: display required badge instead of diagnostic text when extra co…
jaaydenh May 23, 2025
ca39931
chore: remove password form_type from docs (#18015)
Emyrk May 23, 2025
e8306cc
chore: improve chromatic CI (#18014)
BrunoQuaresma May 23, 2025
ce4c8c7
fix: prevent layout shift when Select component dropdown appears (#17…
jaaydenh May 23, 2025
196eccb
feat: add beta labels for dynamic params (#17985)
jaaydenh May 23, 2025
70edc24
chore: remove chartjs (#18016)
BrunoQuaresma May 24, 2025
24d68be
chore: enable dependabot for terraform modules (#18028)
matifali May 24, 2025
5827219
chore: update module sources in templates to new format (#18026)
matifali May 24, 2025
62a5c4c
chore: bump github.com/mark3labs/mcp-go from 0.28.0 to 0.29.0 (#18031)
dependabot[bot] May 24, 2025
a605c09
ci: bump the github-actions group with 2 updates (#18035)
dependabot[bot] May 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 15 additions & 13 deletions .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ This project is called "Coder" - an application for managing remote development

Coder provides a platform for creating, managing, and using remote development environments (also known as Cloud Development Environments or CDEs). It leverages Terraform to define and provision these environments, which are referred to as "workspaces" within the project. The system is designed to be extensible, secure, and provide developers with a seamless remote development experience.

# Core Architecture
## Core Architecture

The heart of Coder is a control plane that orchestrates the creation and management of workspaces. This control plane interacts with separate Provisioner processes over gRPC to handle workspace builds. The Provisioners consume workspace definitions and use Terraform to create the actual infrastructure.

The CLI package serves dual purposes - it can be used to launch the control plane itself and also provides client functionality for users to interact with an existing control plane instance. All user-facing frontend code is developed in TypeScript using React and lives in the `site/` directory.

The database layer uses PostgreSQL with SQLC for generating type-safe database code. Database migrations are carefully managed to ensure both forward and backward compatibility through paired `.up.sql` and `.down.sql` files.

# API Design
## API Design

Coder's API architecture combines REST and gRPC approaches. The REST API is defined in `coderd/coderd.go` and uses Chi for HTTP routing. This provides the primary interface for the frontend and external integrations.

Internal communication with Provisioners occurs over gRPC, with service definitions maintained in `.proto` files. This separation allows for efficient binary communication with the components responsible for infrastructure management while providing a standard REST interface for human-facing applications.

# Network Architecture
## Network Architecture

Coder implements a secure networking layer based on Tailscale's Wireguard implementation. The `tailnet` package provides connectivity between workspace agents and clients through DERP (Designated Encrypted Relay for Packets) servers when direct connections aren't possible. This creates a secure overlay network allowing access to workspaces regardless of network topology, firewalls, or NAT configurations.

## Tailnet and DERP System
### Tailnet and DERP System

The networking system has three key components:

Expand All @@ -35,7 +35,7 @@ The networking system has three key components:

3. **Direct Connections**: When possible, the system establishes peer-to-peer connections between clients and workspaces using STUN for NAT traversal. This requires both endpoints to send UDP traffic on ephemeral ports.

## Workspace Proxies
### Workspace Proxies

Workspace proxies (in the Enterprise edition) provide regional relay points for browser-based connections, reducing latency for geo-distributed teams. Key characteristics:

Expand All @@ -45,9 +45,10 @@ Workspace proxies (in the Enterprise edition) provide regional relay points for
- Managed through the `coder wsproxy` commands
- Implemented primarily in the `enterprise/wsproxy/` package

# Agent System
## Agent System

The workspace agent runs within each provisioned workspace and provides core functionality including:

- SSH access to workspaces via the `agentssh` package
- Port forwarding
- Terminal connectivity via the `pty` package for pseudo-terminal support
Expand All @@ -57,7 +58,7 @@ The workspace agent runs within each provisioned workspace and provides core fun

Agents communicate with the control plane using the tailnet system and authenticate using secure tokens.

# Workspace Applications
## Workspace Applications

Workspace applications (or "apps") provide browser-based access to services running within workspaces. The system supports:

Expand All @@ -69,17 +70,17 @@ Workspace applications (or "apps") provide browser-based access to services runn

The implementation is primarily in the `coderd/workspaceapps/` directory with components for URL generation, proxying connections, and managing application state.

# Implementation Details
## Implementation Details

The project structure separates frontend and backend concerns. React components and pages are organized in the `site/src/` directory, with Jest used for testing. The backend is primarily written in Go, with a strong emphasis on error handling patterns and test coverage.

Database interactions are carefully managed through migrations in `coderd/database/migrations/` and queries in `coderd/database/queries/`. All new queries require proper database authorization (dbauthz) implementation to ensure that only users with appropriate permissions can access specific resources.

# Authorization System
## Authorization System

The database authorization (dbauthz) system enforces fine-grained access control across all database operations. It uses role-based access control (RBAC) to validate user permissions before executing database operations. The `dbauthz` package wraps the database store and performs authorization checks before returning data. All database operations must pass through this layer to ensure security.

# Testing Framework
## Testing Framework

The codebase has a comprehensive testing approach with several key components:

Expand All @@ -91,7 +92,7 @@ The codebase has a comprehensive testing approach with several key components:

4. **Enterprise Testing**: Enterprise features have dedicated test utilities in the `coderdenttest` package.

# Open Source and Enterprise Components
## Open Source and Enterprise Components

The repository contains both open source and enterprise components:

Expand All @@ -100,9 +101,10 @@ The repository contains both open source and enterprise components:
- The boundary between open source and enterprise is managed through a licensing system
- The same core codebase supports both editions, with enterprise features conditionally enabled

# Development Philosophy
## Development Philosophy

Coder emphasizes clear error handling, with specific patterns required:

- Concise error messages that avoid phrases like "failed to"
- Wrapping errors with `%w` to maintain error chains
- Using sentinel errors with the "err" prefix (e.g., `errNotFound`)
Expand All @@ -111,7 +113,7 @@ All tests should run in parallel using `t.Parallel()` to ensure efficient testin

Git contributions follow a standard format with commit messages structured as `type: <message>`, where type is one of `feat`, `fix`, or `chore`.

# Development Workflow
## Development Workflow

Development can be initiated using `scripts/develop.sh` to start the application after making changes. Database schema updates should be performed through the migration system using `create_migration.sh <name>` to generate migration files, with each `.up.sql` migration paired with a corresponding `.down.sql` that properly reverts all changes.

Expand Down
57 changes: 57 additions & 0 deletions .github/actions/setup-go-paths/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "Setup Go Paths"
description: Overrides Go paths like GOCACHE and GOMODCACHE to use temporary directories.
outputs:
gocache:
description: "Value of GOCACHE"
value: ${{ steps.paths.outputs.gocache }}
gomodcache:
description: "Value of GOMODCACHE"
value: ${{ steps.paths.outputs.gomodcache }}
gopath:
description: "Value of GOPATH"
value: ${{ steps.paths.outputs.gopath }}
gotmp:
description: "Value of GOTMPDIR"
value: ${{ steps.paths.outputs.gotmp }}
cached-dirs:
description: "Go directories that should be cached between CI runs"
value: ${{ steps.paths.outputs.cached-dirs }}
runs:
using: "composite"
steps:
- name: Override Go paths
id: paths
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
with:
script: |
const path = require('path');

// RUNNER_TEMP should be backed by a RAM disk on Windows if
// coder/setup-ramdisk-action was used
const runnerTemp = process.env.RUNNER_TEMP;
const gocacheDir = path.join(runnerTemp, 'go-cache');
const gomodcacheDir = path.join(runnerTemp, 'go-mod-cache');
const gopathDir = path.join(runnerTemp, 'go-path');
const gotmpDir = path.join(runnerTemp, 'go-tmp');

core.exportVariable('GOCACHE', gocacheDir);
core.exportVariable('GOMODCACHE', gomodcacheDir);
core.exportVariable('GOPATH', gopathDir);
core.exportVariable('GOTMPDIR', gotmpDir);

core.setOutput('gocache', gocacheDir);
core.setOutput('gomodcache', gomodcacheDir);
core.setOutput('gopath', gopathDir);
core.setOutput('gotmp', gotmpDir);

const cachedDirs = `${gocacheDir}\n${gomodcacheDir}`;
core.setOutput('cached-dirs', cachedDirs);

- name: Create directories
shell: bash
run: |
set -e
mkdir -p "$GOCACHE"
mkdir -p "$GOMODCACHE"
mkdir -p "$GOPATH"
mkdir -p "$GOTMPDIR"
32 changes: 9 additions & 23 deletions .github/actions/setup-go/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,25 @@ inputs:
use-preinstalled-go:
description: "Whether to use preinstalled Go."
default: "false"
use-temp-cache-dirs:
description: "Whether to use temporary GOCACHE and GOMODCACHE directories."
default: "false"
use-cache:
description: "Whether to use the cache."
default: "true"
runs:
using: "composite"
steps:
- name: Override GOCACHE and GOMODCACHE
shell: bash
if: inputs.use-temp-cache-dirs == 'true'
run: |
# cd to another directory to ensure we're not inside a Go project.
# That'd trigger Go to download the toolchain for that project.
cd "$RUNNER_TEMP"
# RUNNER_TEMP should be backed by a RAM disk on Windows if
# coder/setup-ramdisk-action was used
export GOCACHE_DIR="$RUNNER_TEMP""\go-cache"
export GOMODCACHE_DIR="$RUNNER_TEMP""\go-mod-cache"
export GOPATH_DIR="$RUNNER_TEMP""\go-path"
mkdir -p "$GOCACHE_DIR"
mkdir -p "$GOMODCACHE_DIR"
mkdir -p "$GOPATH_DIR"
go env -w GOCACHE="$GOCACHE_DIR"
go env -w GOMODCACHE="$GOMODCACHE_DIR"
go env -w GOPATH="$GOPATH_DIR"

- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ inputs.use-preinstalled-go == 'false' && inputs.version || '' }}
cache: ${{ inputs.use-cache }}

- name: Install gotestsum
shell: bash
run: go install gotest.tools/gotestsum@3f7ff0ec4aeb6f95f5d67c998b71f272aa8a8b41 # v1.12.1
run: go install gotest.tools/gotestsum@0d9599e513d70e5792bb9334869f82f6e8b53d4d # main as of 2025-05-15

- name: Install mtimehash
shell: bash
run: go install github.com/slsyy/mtimehash/cmd/mtimehash@a6b5da4ed2c4a40e7b805534b004e9fde7b53ce0 # v1.0.0

# It isn't necessary that we ever do this, but it helps
# separate the "setup" from the "run" times.
Expand Down
27 changes: 0 additions & 27 deletions .github/actions/setup-imdisk/action.yaml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,21 @@ updates:
update-types:
- version-update:semver-major
open-pull-requests-limit: 15

- package-ecosystem: "terraform"
directories:
- "dogfood/*/"
- "examples/templates/*/"
schedule:
interval: "weekly"
commit-message:
prefix: "chore"
groups:
coder:
patterns:
- "registry.coder.com/coder/*/coder"
labels: []
ignore:
- dependency-name: "*"
update-types:
- version-update:semver-major
Loading
Loading