Skip to content

Commit 8392cb0

Browse files
authored
Merge branch 'main' into 2025-screenshots-01
2 parents 9013683 + 0d3b770 commit 8392cb0

File tree

181 files changed

+11001
-1406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+11001
-1406
lines changed

.claude/docs/DATABASE.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222

2323
### Helper Scripts
2424

25-
| Script | Purpose |
26-
|--------|---------|
27-
| `./coderd/database/migrations/create_migration.sh "migration name"` | Creates new migration files |
28-
| `./coderd/database/migrations/fix_migration_numbers.sh` | Renumbers migrations to avoid conflicts |
29-
| `./coderd/database/migrations/create_fixture.sh "fixture name"` | Creates test fixtures for migrations |
25+
| Script | Purpose |
26+
|---------------------------------------------------------------------|-----------------------------------------|
27+
| `./coderd/database/migrations/create_migration.sh "migration name"` | Creates new migration files |
28+
| `./coderd/database/migrations/fix_migration_numbers.sh` | Renumbers migrations to avoid conflicts |
29+
| `./coderd/database/migrations/create_fixture.sh "fixture name"` | Creates test fixtures for migrations |
3030

3131
### Database Query Organization
3232

@@ -214,6 +214,5 @@ make lint
214214
- [ ] Migration files exist (both up and down)
215215
- [ ] `make gen` run after query changes
216216
- [ ] Audit table updated for new fields
217-
- [ ] In-memory database implementations updated
218217
- [ ] Nullable fields use `sql.Null*` types
219218
- [ ] Authorization context appropriate for endpoint type

.claude/docs/OAUTH2.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ Before completing OAuth2 or authentication feature work:
151151
- [ ] Update RBAC permissions for new resources
152152
- [ ] Add audit logging support if applicable
153153
- [ ] Create database migrations with proper defaults
154-
- [ ] Update in-memory database implementations
155154
- [ ] Add comprehensive test coverage including edge cases
156155
- [ ] Verify linting compliance
157156
- [ ] Test both positive and negative scenarios

.claude/docs/TROUBLESHOOTING.md

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,33 @@ When facing multiple failing tests or complex integration issues:
116116

117117
### Useful Debug Commands
118118

119-
| Command | Purpose |
120-
|---------|---------|
121-
| `make lint` | Run all linters |
122-
| `make gen` | Generate mocks, database queries |
119+
| Command | Purpose |
120+
|----------------------------------------------|---------------------------------------|
121+
| `make lint` | Run all linters |
122+
| `make gen` | Generate mocks, database queries |
123123
| `go test -v ./path/to/package -run TestName` | Run specific test with verbose output |
124-
| `go test -race ./...` | Run tests with race detector |
124+
| `go test -race ./...` | Run tests with race detector |
125125

126126
### LSP Debugging
127127

128-
| Command | Purpose |
129-
|---------|---------|
130-
| `mcp__go-language-server__definition symbolName` | Find function definition |
131-
| `mcp__go-language-server__references symbolName` | Find all references |
132-
| `mcp__go-language-server__diagnostics filePath` | Check for compilation errors |
128+
#### Go LSP (Backend)
129+
130+
| Command | Purpose |
131+
|----------------------------------------------------|------------------------------|
132+
| `mcp__go-language-server__definition symbolName` | Find function definition |
133+
| `mcp__go-language-server__references symbolName` | Find all references |
134+
| `mcp__go-language-server__diagnostics filePath` | Check for compilation errors |
135+
| `mcp__go-language-server__hover filePath line col` | Get type information |
136+
137+
#### TypeScript LSP (Frontend)
138+
139+
| Command | Purpose |
140+
|----------------------------------------------------------------------------|------------------------------------|
141+
| `mcp__typescript-language-server__definition symbolName` | Find component/function definition |
142+
| `mcp__typescript-language-server__references symbolName` | Find all component/type usages |
143+
| `mcp__typescript-language-server__diagnostics filePath` | Check for TypeScript errors |
144+
| `mcp__typescript-language-server__hover filePath line col` | Get type information |
145+
| `mcp__typescript-language-server__rename_symbol filePath line col newName` | Rename across codebase |
133146

134147
## Common Error Messages
135148

@@ -197,6 +210,8 @@ When facing multiple failing tests or complex integration issues:
197210

198211
- Check existing similar implementations in codebase
199212
- Use LSP tools to understand code relationships
213+
- For Go code: Use `mcp__go-language-server__*` commands
214+
- For TypeScript/React code: Use `mcp__typescript-language-server__*` commands
200215
- Read related test files for expected behavior
201216

202217
### External Resources

.claude/docs/WORKFLOWS.md

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,11 @@
127127

128128
## Code Navigation and Investigation
129129

130-
### Using Go LSP Tools (STRONGLY RECOMMENDED)
130+
### Using LSP Tools (STRONGLY RECOMMENDED)
131131

132-
**IMPORTANT**: Always use Go LSP tools for code navigation and understanding. These tools provide accurate, real-time analysis of the codebase and should be your first choice for code investigation.
132+
**IMPORTANT**: Always use LSP tools for code navigation and understanding. These tools provide accurate, real-time analysis of the codebase and should be your first choice for code investigation.
133+
134+
#### Go LSP Tools (for backend code)
133135

134136
1. **Find function definitions** (USE THIS FREQUENTLY):
135137
- `mcp__go-language-server__definition symbolName`
@@ -145,14 +147,49 @@
145147
- `mcp__go-language-server__hover filePath line column`
146148
- Get type information and documentation at specific positions
147149

150+
#### TypeScript LSP Tools (for frontend code in site/)
151+
152+
1. **Find component/function definitions** (USE THIS FREQUENTLY):
153+
- `mcp__typescript-language-server__definition symbolName`
154+
- Example: `mcp__typescript-language-server__definition LoginPage`
155+
- Quickly navigate to React components, hooks, and utility functions
156+
157+
2. **Find symbol references** (ESSENTIAL FOR UNDERSTANDING IMPACT):
158+
- `mcp__typescript-language-server__references symbolName`
159+
- Locate all usages of components, types, or functions
160+
- Critical for refactoring React components and understanding prop usage
161+
162+
3. **Get type information**:
163+
- `mcp__typescript-language-server__hover filePath line column`
164+
- Get TypeScript type information and JSDoc documentation
165+
166+
4. **Rename symbols safely**:
167+
- `mcp__typescript-language-server__rename_symbol filePath line column newName`
168+
- Rename components, props, or functions across the entire codebase
169+
170+
5. **Check for TypeScript errors**:
171+
- `mcp__typescript-language-server__diagnostics filePath`
172+
- Get compilation errors and warnings for a specific file
173+
148174
### Investigation Strategy (LSP-First Approach)
149175

176+
#### Backend Investigation (Go)
177+
150178
1. **Start with route registration** in `coderd/coderd.go` to understand API endpoints
151-
2. **Use LSP `definition` lookup** to trace from route handlers to actual implementations
152-
3. **Use LSP `references`** to understand how functions are called throughout the codebase
179+
2. **Use Go LSP `definition` lookup** to trace from route handlers to actual implementations
180+
3. **Use Go LSP `references`** to understand how functions are called throughout the codebase
153181
4. **Follow the middleware chain** using LSP tools to understand request processing flow
154182
5. **Check test files** for expected behavior and error patterns
155183

184+
#### Frontend Investigation (TypeScript/React)
185+
186+
1. **Start with route definitions** in `site/src/App.tsx` or router configuration
187+
2. **Use TypeScript LSP `definition`** to navigate to React components and hooks
188+
3. **Use TypeScript LSP `references`** to find all component usages and prop drilling
189+
4. **Follow the component hierarchy** using LSP tools to understand data flow
190+
5. **Check for TypeScript errors** with `diagnostics` before making changes
191+
6. **Examine test files** (`.test.tsx`) for component behavior and expected props
192+
156193
## Troubleshooting Development Issues
157194

158195
### Common Issues

.github/.linkspector.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ ignorePatterns:
2525
- pattern: "docs.github.com"
2626
- pattern: "claude.ai"
2727
- pattern: "splunk.com"
28+
- pattern: "stackoverflow.com/questions"
2829
aliveStatusCodes:
2930
- 200

.github/workflows/release.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,29 @@ jobs:
634634
- name: ls build
635635
run: ls -lh build
636636

637+
- name: Publish Coder CLI binaries and detached signatures to GCS
638+
if: ${{ !inputs.dry_run && github.ref == 'refs/heads/main' && github.repository_owner == 'coder'}}
639+
run: |
640+
set -euxo pipefail
641+
642+
version="$(./scripts/version.sh)"
643+
644+
binaries=(
645+
"coder-darwin-amd64"
646+
"coder-darwin-arm64"
647+
"coder-linux-amd64"
648+
"coder-linux-arm64"
649+
"coder-linux-armv7"
650+
"coder-windows-amd64.exe"
651+
"coder-windows-arm64.exe"
652+
)
653+
654+
for binary in "${binaries[@]}"; do
655+
detached_signature="${binary}.asc"
656+
gcloud storage cp "./site/out/bin/${binary}" "gs://releases.coder.com/coder-cli/${version}/${binary}"
657+
gcloud storage cp "./site/out/bin/${detached_signature}" "gs://releases.coder.com/coder-cli/${version}/${detached_signature}"
658+
done
659+
637660
- name: Publish release
638661
run: |
639662
set -euo pipefail

CLAUDE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,19 @@
4747

4848
### LSP Navigation (USE FIRST)
4949

50+
#### Go LSP (for backend code)
51+
5052
- **Find definitions**: `mcp__go-language-server__definition symbolName`
5153
- **Find references**: `mcp__go-language-server__references symbolName`
5254
- **Get type info**: `mcp__go-language-server__hover filePath line column`
55+
- **Rename symbol**: `mcp__go-language-server__rename_symbol filePath line column newName`
56+
57+
#### TypeScript LSP (for frontend code in site/)
58+
59+
- **Find definitions**: `mcp__typescript-language-server__definition symbolName`
60+
- **Find references**: `mcp__typescript-language-server__references symbolName`
61+
- **Get type info**: `mcp__typescript-language-server__hover filePath line column`
62+
- **Rename symbol**: `mcp__typescript-language-server__rename_symbol filePath line column newName`
5363

5464
### OAuth2 Error Handling
5565

CODEOWNERS

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
# These APIs are versioned, so any changes need to be carefully reviewed for whether
2-
# to bump API major or minor versions.
1+
# These APIs are versioned, so any changes need to be carefully reviewed for
2+
# whether to bump API major or minor versions.
33
agent/proto/ @spikecurtis @johnstcn
4+
provisionerd/proto/ @spikecurtis @johnstcn
5+
provisionersdk/proto/ @spikecurtis @johnstcn
46
tailnet/proto/ @spikecurtis @johnstcn
57
vpn/vpn.proto @spikecurtis @johnstcn
68
vpn/version.go @spikecurtis @johnstcn
7-
provisionerd/proto/ @spikecurtis @johnstcn
8-
provisionersdk/proto/ @spikecurtis @johnstcn
9+
10+
11+
# This caching code is particularly tricky, and one must be very careful when
12+
# altering it.
13+
coderd/files/ @aslilac
14+
15+
16+
site/ @aslilac

agent/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ type Client interface {
9898
ConnectRPC26(ctx context.Context) (
9999
proto.DRPCAgentClient26, tailnetproto.DRPCTailnetClient26, error,
100100
)
101-
RewriteDERPMap(derpMap *tailcfg.DERPMap)
101+
tailnet.DERPMapRewriter
102102
}
103103

104104
type Agent interface {

0 commit comments

Comments
 (0)