feat: scope linear watcher per team and pick ticket team in UI - #240
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
webmux | cb9079b | Commit Preview URL Branch Preview URL |
May 18 2026, 01:09 PM |
|
Claude finished @hugocasa's task in 3m 14s —— View job Code Review for PR #240
Overall this is a well-scoped, well-tested change. The decoupling of "which teams the watcher monitors" from "which team a new ticket files into" makes sense and matches the multi-instance scenario described in the PR. The watcher filter is composed cleanly via Issues1. Silent breakage for users with existing
// in parseLinearIntegration, after deriving watchTeams:
if (typeof linear.teamId === "string") {
log.warn("[config] integrations.linear.teamId is no longer used — pick the team at ticket-creation time in the dialog");
}2. Server accepts any string for
const linearTeamKey = body.linearTeamKey?.trim().toUpperCase() || undefined;
// ...
if (createLinearTicket) {
if (!linearTeamKey || !LinearTeamKeySchema.safeParse(linearTeamKey).success) {
return errorResponse("Invalid Linear team key (expected uppercase letters, e.g. \"ENG\")", 400);
}
// ...
}3. Redundant
4.
<input
...
oninput={(e: Event) => { linearTeamKey = (e.currentTarget as HTMLInputElement).value.toUpperCase(); }}
value={linearTeamKey}
/>(Or keep 5.
Nits
Things that look good
|
|
Claude finished @hugocasa's task in 3m 6s —— View job Code Review for PR #240Solid PR overall — clean schema migration, sensible UX, and good test coverage. A handful of polish notes below; nothing blocking. What works well
Suggestions
Minor / informational
Test coverage
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Two improvements to the Linear integration:
integrations.linear.watchTeamsfield in.webmux.yamlfilters the auto-create watcher to specific Linear teams. Useful when the same Linear user runs webmux against multiple projects on one machine — without this, every instance would race to claim the samewebmux-labeled issues across all teams.integrations.linear.teamId(UUID, opaque) was only consulted by the "Create Linear ticket" toggle in the new-worktree dialog. Replaced with a team-key input inside the dialog itself (validated likeLinearPostDialog, last-used value persisted in localStorage). One webmux instance can now file tickets across multiple teams without editing yaml.Changes
integrations.linear.teamIdfrom the schema, type, parser, init template, and tests.integrations.linear.watchTeams: [ENG, OPS](team keys, case-insensitive, normalized on parse). Wired throughstartLinearAutoCreateMonitor.filterAutoCreateIssues/filterAutoOneshotIssuesnow accept an optionalwatchTeamKeysarg; issues whoseteam.keyis outside the list are dropped before label/dedup checks.POST /api/worktreesbody gains an optionallinearTeamKey. Required whencreateLinearTicket: true; resolved server-side viafetchTeamByKey.CreateWorktreeDialogshows a "Team key" input inside the existing create-ticket panel (validated withparseLinearTarget). Submit is blocked until the key is valid. Last-used value persisted inlocalStorage["wt-linear-team-key"].watchTeams.Test plan
bun run --cwd backend check(tsc)bun run --cwd frontend check(svelte-check)bun test— backend 316/316, packages 5/5, bin 107/107, frontend 73/73watchTeamsfilter (allow-all, case-insensitive match, oneshot variant)createTicketOption: true, flip the toggle, confirm team-key input appears and validates; submit with a real team key and verify the ticket is filedwatchTeams: [ENG]on a project where the user has issues across multiple teams, restart server, verify only ENG-labeled issues trigger auto-createGenerated with Claude Code