Skip to content

fix(cloud): align Trigger.dev connect copy with the console - #102

Merged
justinhelmer merged 1 commit into
mainfrom
fix/triggerdev-connect-copy
Sep 17, 2026
Merged

justinhelmer merged 1 commit into
mainfrom
fix/triggerdev-connect-copy

Conversation

@justinhelmer

Copy link
Copy Markdown
Contributor

polylane cloud connect --provider triggerdev now says the same sentences the console says: preset names quoted the way Trigger.dev writes them, and one shared instruction for the project ref. A person moving between the two surfaces reads one set of words.

Why: nominal #3280 settled the console copy (the "No restrictions" access preset, "This key cannot name its project. Paste the project ref from the project's settings page (it starts with proj_)."). The CLI, shipped in #101, said the same things in different words, so the two surfaces disagreed on the primary instruction.

Where to look

  1. The project ref hints lead with the console's sentence and keep the trigger.config.ts pointer as the second sentence; the headless hint reuses the where-to-find fragment.
  2. The prompt is labelled "Project ref" with a proj_… placeholder, as in the console. ⚠ The /project ref/i match on the API's detail four lines above is unchanged.
  3. The key instruction opens with the console's sentence and quotes "Observer" and "Deploy only".
  4. The test fixtures now carry the API's real detail strings, and the hint assertion pins both sentences.

Feedback wanted: Is keeping the trigger.config.ts sentence worth the extra length, or should the CLI say only what the console says?

Risk: Copy only; no control flow, flag, or API body changed. If a sentence reads wrong the fix is another copy commit. Rollback is a revert.

Verified: npm run typecheck exit 0, npm run lint exit 0, npm run test 524 pass / 0 fail; the extended hint assertion fails against the previous constants (5 pass / 1 fail). Nothing human-gated.

Decisions (3)
  • Keep the trigger.config.ts pointer, second. Trigger.dev's config docs say the project field is "your project ref (you can see it on the Project settings page in the dashboard)", so the sentence is true and useful for someone in a checkout; the console's sentence leads because it is the shared primary instruction.
  • Split the hint into a where-to-find fragment and the after-400 sentence. "This key cannot name its project" is what the API has just said and fits the retry paths; the pre-emptive headless hint instead says when to add --project-ref and reuses only the where-to-find fragment.
  • Test fixtures use the API's real detail strings. The old fixture was a detail the API no longer sends. The regex in connectTriggerdev matches detail, not guidance (#3280 changed only guidance), so proving the match against the live string is what the test is for.
Validation (5 criteria)
Criterion Proof
Headless project-ref 400 becomes a usage error whose hint names --project-ref, "This key cannot name its project.", the settings page and trigger.config.ts test/cloud-connect-triggerdev.test.ts::turns the project-ref-required 400 into a usage error with a --project-ref hint when not interactive, pass at head; fails against the previous connect.ts (5 pass / 1 fail)
The /project ref/i match still fires on the API's live detail ("The Trigger.dev project ref is required for a restricted key") same test, fixture REF_REQUIRED is that string verbatim
A "cannot read runs" 400 and non-400 errors are rethrown untouched ::rethrows other 400s untouched, including a key that cannot read runs, ::rethrows non-400 errors untouched, pass
Strict typecheck and lint clean npm run typecheck exit 0, npm run lint exit 0
Whole suite green npm run test: 524 tests, 524 pass, 0 fail
For agents

Source of the copy, read at nominal f141e76f2a530b1335df8fcf268cbe8abea648d3: apps/console/app/components/slideovers/clouds/TriggerdevConnectSlideover.vue (key instruction, "Project ref" field, proj_… placeholder), apps/console/app/utils/triggerdev-checklist.ts (formatTriggerdevPresetList quoting rule), apps/apis/api-cloud-accounts/src/routers/cloud-accounts/connects/triggerdev.ts (RUNS_REQUIRED_GUIDANCE, PROJECT_REF_REQUIRED_GUIDANCE, and the unchanged detail strings the fixtures copy). No webhook mention on purpose: the CLI says nothing about webhooks for Railway either. src/generated/ is codegen output and not in the diff.

🤖 Generated with Claude Code

The console (nominal #3280) quotes Trigger.dev's preset names the way
Trigger.dev writes them ("No restrictions", "Observer", "Deploy only")
and asks for the project ref with "This key cannot name its project.
Paste the project ref from the project's settings page (it starts with
proj_)." The CLI said the same things in different words. Both surfaces
now lead with the same sentences; the CLI keeps its pointer to the
`project` line in trigger.config.ts, which Trigger.dev's config docs
confirm is the project ref. The prompt label is "Project ref" with a
proj_ placeholder, as in the console.

No behaviour changes. The `/project ref/i` match on the API's `detail`
is untouched; #3280 changed only the API `guidance` strings. The test
fixtures now carry the API's real `detail` strings so the match is
proven against what the API sends.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@coreplane-switchboard coreplane-switchboard Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM: Copy-only alignment of Trigger.dev connect wording with the console; fixtures verified verbatim against the API source, tests strengthened, no behavior change.

Verdict: approve — copy-only change, correct and well-verified.

What I checked (head 31d292d, 2 files, +16/−14, all read in full):

  • Copy-only, as claimed. The diff touches only string constants (TRIGGERDEV_PROJECT_REF_WHERE/_HINT, TRIGGERDEV_HEADLESS_HINT, the key-instruction text), the prompt label/placeholder, and the test file. No control flow, flags, or API body changed.
  • Fixtures verified against the source of truth. I read apps/apis/api-cloud-accounts/src/routers/cloud-accounts/connects/triggerdev.ts in nominal: REF_REQUIRED ("The Trigger.dev project ref is required for a restricted key") and RUNS_REQUIRED ("This Trigger.dev API key cannot read runs") are the API's detail strings verbatim, as the PR claims.
  • The /project ref/i match stays correct. It fires on the live ref-required detail and does not fire on the runs-required detail, so the retry-vs-rethrow split holds; the tests pin both paths.
  • Test guard: no test removed or skipped; the hint assertion gained two includes checks (strengthened) and the runs-required test's inline string became a shared constant — refactor, verification intact.
  • No docs/reference/specs/ in this repo — nothing to spec-check.

No findings.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: coreplane-switchboard[bot] reviewed this PR and posted an LGTM verdict (see its review). A repo admin enabled this via the auto-approve workflow.

@justinhelmer
justinhelmer merged commit d38d380 into main Sep 17, 2026
4 checks passed
@justinhelmer
justinhelmer deleted the fix/triggerdev-connect-copy branch September 17, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant