Skip to content

Generalize package invocation token UI - #548

Merged
kentcdodds merged 1 commit into
mainfrom
generic-package-invocation-token-ui
Jun 18, 2026
Merged

kentcdodds merged 1 commit into
mainfrom
generic-package-invocation-token-ui

Conversation

@kody-bot

@kody-bot kody-bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Remove the client-specific default button and all Raycast-specific UI copy from package invocation token management.
  • Replace docs and tests with generic trusted-client examples.
  • Preserve wildcard package/export support and source allowlist behavior without promoting a specific client.

Testing

  • npm run typecheck
  • npx vitest run --project node-unit packages/worker/src/app/handlers/account-package-invocation-tokens.node.test.ts packages/worker/src/package-invocations/service.node.test.ts
  • npm run lint (passes with the existing unrelated warnings)
  • npm run format:check
  • rg "Raycast|raycast" /workspace (no matches)
  • Manual browser walkthrough for generic token create/revoke with no Raycast UI text.

Summary by CodeRabbit

  • Documentation

    • Updated package invocation API documentation to use a "Personal automation" example instead of the previous "Personal Raycast" example.
  • Chores

    • Removed "Use Raycast defaults" button from token creation form.
    • Updated placeholder text for token name and sources fields to reflect new naming conventions.
  • Tests

    • Updated token creation and service invocation test scenarios to use "personal-client" source configuration.

@coderabbitai

coderabbitai Bot commented Jun 18, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 68cf4b46-531d-4e0c-8eaa-8abc321dd70b

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between a0e1838 and 5a1471c.

πŸ“’ Files selected for processing (4)
  • docs/contributing/package-invocation-api.md
  • packages/worker/client/routes/account-package-invocation-tokens.tsx
  • packages/worker/src/app/handlers/account-package-invocation-tokens.node.test.ts
  • packages/worker/src/package-invocations/service.node.test.ts

πŸ“ Walkthrough

Walkthrough

Replaces all "Raycast"/"raycast" references with "Personal automation"/"personal-client" across the token-creation UI route (removing the "Use Raycast defaults" button and its helper), the contributing docs example payload and URL, and the handler and service test fixtures.

Changes

Raycast β†’ personal-client rename

Layer / File(s) Summary
Remove Raycast defaults button and update form placeholders
packages/worker/client/routes/account-package-invocation-tokens.tsx
Removes getSecondaryButtonCss import, secondaryButtonCss constant, useRaycastDefaults helper function, and the "Use Raycast defaults" secondary button. Updates the Name placeholder to "Personal automation" and the Allowed sources placeholder to "personal-client".
Update contributing docs examples to personal-client
docs/contributing/package-invocation-api.md
Changes the token creation JSON example token name and sources field, and refreshes the "Personal client pattern" section URL and guidance text from Raycast-specific values to personal-client.
Align handler and service test fixtures to personal-client
packages/worker/src/app/handlers/account-package-invocation-tokens.node.test.ts, packages/worker/src/package-invocations/service.node.test.ts
Updates mocked token metadata, POST body payloads, insertPackageInvocationToken call assertions, raw-token redaction checks, test names, and allowed/denied invocation scenarios to use personal-client sources throughout.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Possibly related PRs

  • kentcdodds/kody#275: Introduced the external package invocation API with source-based allowlist behavior that the service.node.test.ts fixtures updated in this PR directly exercise.
  • kentcdodds/kody#546: Introduced the "Use Raycast defaults" UI flow and the Raycast-specific token/source allowlist that this PR removes and replaces with the generic personal-client pattern.

Poem

πŸ‡ Hop hop, the Raycast name is gone,
"Personal automation" carries on.
The button removed, the placeholder changed,
Docs and tests have been rearranged.
A cleaner name now leads the way β€”
personal-client saves the day! 🌟

πŸš₯ Pre-merge checks | βœ… 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
βœ… Passed checks (4 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed The title 'Generalize package invocation token UI' accurately captures the main objective: removing client-specific customizations and Raycast-branded elements to make the feature client-agnostic.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
πŸ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch generic-package-invocation-token-ui

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kentcdodds
kentcdodds marked this pull request as ready for review June 18, 2026 22:52
@github-actions

Copy link
Copy Markdown
Contributor

πŸ”Ž Preview deployed: https://kody-pr-548.kentcdodds.workers.dev

Worker: kody-pr-548
D1: kody-pr-548-db
KV: kody-pr-548-oauth-kv

Mocks:

@kentcdodds
kentcdodds merged commit d1f6d70 into main Jun 18, 2026
7 checks passed
@kentcdodds
kentcdodds deleted the generic-package-invocation-token-ui branch June 18, 2026 23:25
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.

3 participants