Skip to content

feat(action-collection): action collection store MVP#1690

Open
taiiiyang wants to merge 9 commits into
mainfrom
feat/action-collection-mvp
Open

feat(action-collection): action collection store MVP#1690
taiiiyang wants to merge 9 commits into
mainfrom
feat/action-collection-mvp

Conversation

@taiiiyang

@taiiiyang taiiiyang commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Type of Changes

  • ✨ New feature (feat)

Description

Action Collection (custom AI instruction store) MVP on the extension side, wired to the new id-based backend contract.

Featured store picks

  • New "Featured" horizontal card row on the Custom AI Actions page, between the title/description and the editor (VS Code marketplace card style: icon on the left, title/description/author on the right, install count in the top-right). New components/featured-collections.tsx.
  • Clicking a card opens ActionCollectionDetailDialog (new components/ai-feature-store.tsx) to preview and install; the whole section hides when there are no public collections.
  • "My published" entry kept at the right of the section title (visible when signed in, opens /my-collections). New components/my-published-button.tsx.
  • App-level deep-link handler ActionCollectionInstallListener mounted in app.tsx, reads the install param and opens the detail dialog.

Add-action dialog

  • Removed the tabs in the "Add AI Action" dialog; it now shows only the official template list (community picks live in the Featured section above). components/add-action-dialog.tsx, components/action-card-list.tsx.

Publish to store

  • PublishActionButton moved to the top-right of the editor card. action-config-form/index.tsx.
  • Publish dialog drops the slug input (lower cognitive cost) and uses a textarea for the description.

id-based install deep link

  • www → content script → background → options page now flows by numeric id: content script reads event.data.id (action-collections.content/{bridge,index}.ts), message.ts carries requestActionCollectionInstall({ collectionId }), background opens the options page via the route mechanism (openOptionsPage({ route })).
  • Detail/install hooks call getDetail({ id }) / install({ id }); share links are built from collectionId.

oRPC layer & refactor

  • Pure interface hooks isolated in src/orpc/action-collection.ts; install business logic in install-action-collection.ts.
  • Introduced ts-pattern (new dependency): utils/orpc/localize-error.ts instanceof chain and the detail dialog tri-state render.

Config & i18n

  • types/config/selection-toolbar.ts: custom actions gain an optional actionCollection source snapshot (collection id/version/author/shareUrl/installedAt).
  • 9 locale files get the action-collection strings.

Related Issue

Closes #

How Has This Been Tested?

  • Added unit tests
  • Verified through manual testing

pnpm type-check, pnpm lint, and pnpm test (1315 passed) all pass. Manually verified via dev:local against a local backend: featured cards rendering, detail-dialog install, publish flow, and the install deep link.

Checklist

  • I have tested these changes locally
  • I have updated the documentation accordingly if necessary
  • My code follows the code style of this project
  • My changes do not break existing functionality
  • If my code was generated by AI, I have proofread and improved it as necessary.

Additional Information

The companion backend changes live in the monorepo (api-contract / packages/api / apps/www) and follow the input=id / output=collectionId naming convention.

taiiiyang and others added 3 commits June 13, 2026 15:09
- Featured store picks row on custom-actions page (VS Code marketplace card style)
- Publish-to-store dialog (slug removed, description textarea)
- id-based detail/install across content script → background → options deep link
- decouple orpc hooks; localize-error via ts-pattern; detail dialog tri-state via ts-pattern

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…n-mvp

# Conflicts:
#	src/locales/zh-TW.yml
#	src/utils/message.ts
#	src/utils/navigation.ts
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1adc8d8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added feat contrib-trust:trusted PR author trust score is 60-79. labels Jun 13, 2026
@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Contributor trust score

73/100 — Trusted

This score estimates contributor familiarity with mengxi-ream/read-frog using public GitHub signals. It is advisory only and does not block merges automatically.

Outcome

Score breakdown

Dimension Score Signals
Repo familiarity 35/35 commits in repo, merged PRs, reviews
Community standing 17/25 account age, followers, repo role
OSS influence 3/20 stars on owned non-fork repositories
PR track record 18/20 merge rate across resolved PRs in this repo

Signals used

  • Repo commits: 89 (author commits reachable from the repository default branch)
  • Repo PR history: merged 98, open 2, closed-unmerged 8
  • Repo reviews: 14
  • PR changed lines: 1036 (+1007 / -29)
  • Repo permission: write
  • Followers: 21
  • Account age: 80 months
  • Owned non-fork repos considered: max 2, total 2 (taiiiyang/oss-stamp (2), taiiiyang/homepage (0), taiiiyang/gsap_cocktail (0), taiiiyang/visactor-image (0), taiiiyang/react-components (0), taiiiyang/TinyVis (0), taiiiyang/taiiiyang (0), taiiiyang/toolbox (0), taiiiyang/find_txt (0), taiiiyang/rustlings_answer (0), taiiiyang/vue-mini (0))

Policy

  • Low-score review threshold: < 30
  • Auto-close: score < 20 and changed lines > 1000
  • Policy version: v1.1

Updated automatically when the PR changes or when a maintainer reruns the workflow.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 54813fd07f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +63 to +65
const config = await getLocalConfig() ?? DEFAULT_CONFIG
const result = upsertInstalledActionCollection(config, payload)
await setLocalConfig(result.nextConfig)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use queued config writes when installing collections

In the options page, normal config edits go through writeConfigAtom, which queues storage writes and keeps the optimistic atom state current. This helper reads and writes local storage directly, so if a user installs a collection while an auto-save/provider edit is still queued, it can build nextConfig from stale storage and then replace configAtom with that stale object, dropping the recent edit or having the install overwritten by the queued write. Route this update through the same queued config writer or derive it from the current atom state.

Useful? React with 👍 / 👎.

taiiiyang and others added 6 commits June 13, 2026 15:33
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ed card

- import action-collection bridge constants from @read-frog/definitions, drop local bridge.ts
- featured card: inline icon with title, install count bottom-right with author, narrower card

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ction

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… context

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

This PR has been inactive for 14 days and is now marked as stale.
It will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions Bot added the Stale label Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contrib-trust:trusted PR author trust score is 60-79. feat Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant