Skip to content

fix(metadata-protocol): user-facing copy for writable_package_required rejection - #2625

Merged
os-zhuang merged 3 commits into
mainfrom
claude/showcase-chrome-extension-ux-qs9gx7
Jul 5, 2026
Merged

fix(metadata-protocol): user-facing copy for writable_package_required rejection#2625
os-zhuang merged 3 commits into
mainfrom
claude/showcase-chrome-extension-ux-qs9gx7

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What

Rewrites the writable_package_required rejection message in packages/metadata-protocol/src/protocol.ts as end-user remediation. The message is surfaced verbatim as a Studio toast, but its copy was developer-facing — it told the user to "See docs/adr/0070-package-first-authoring.md", an internal ADR path that means nothing to a console user.

  • New copy: "the package '…' is read-only (provided by code or an installed app). Switch to a writable package in the package selector, or create a new one, and retry."
  • The ADR pointer moves to a docs property on the thrown error, so API consumers/agents keep the reference without it leaking into UI toasts.
  • code (writable_package_required), status (422), and packageId are unchanged.

Why

Found by the Studio package-create UX dogfood (#2609): this is the P1 "read-only rejection copy cites an internal ADR path" item, the only framework-side entry in tracking issue #2615.

Verification

  • turbo run build --filter=@objectstack/metadata-protocol... — clean
  • packages/objectql/src/protocol-save-meta-repo-path.test.ts — 13/13 pass (asserts code/status, not copy)
  • packages/dogfood/test/package-first-authoring.dogfood.test.ts (ADR-0070 golden regression) — 5/5 pass
  • Changeset added (@objectstack/metadata-protocol: patch)

Closes the framework-side checkbox in #2615.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DHQc5BdGhTzPfazex3vWdt


Generated by Claude Code

…d rejection
The rejection message is surfaced verbatim as a Studio toast, but its copy
was written for developers — it cited an internal ADR path as the remedy.
Rewrite the sentence as end-user remediation (switch to a writable package
in the package selector, or create one); the ADR pointer moves to a docs
property on the error. code/status/packageId are unchanged, so API
consumers and the ADR-0070 golden regression are unaffected.
Found by the Studio package-create UX dogfood (#2609, tracking #2615).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DHQc5BdGhTzPfazex3vWdt
@vercel

vercelBot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
specReadyReadyPreview, CommentJul 5, 2026 7:58am

Request Review

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DHQc5BdGhTzPfazex3vWdt
@os-zhuang
os-zhuang marked this pull request as ready for review July 5, 2026 07:50
@os-zhuangos-zhuang reopened this Jul 5, 2026
@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation tooling size/s labels Jul 5, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

No hand-written docs reference the 1 changed package(s). ✅

@os-zhuangClaude

Copy link
Copy Markdown
ContributorAuthor

Superseded by #2618 (69bc04e), which landed the same fix on main — the rejection copy no longer cites the internal ADR path. The only remainder here was a machine-readable docs property on the error, not worth a standalone release entry. Closing; the framework-side item in #2615 is done via #2618.


Generated by Claude Code

@os-zhuang
os-zhuang merged commit 75c310f into mainJul 5, 2026
16 checks passed
@os-zhuang
os-zhuang deleted the claude/showcase-chrome-extension-ux-qs9gx7 branch July 5, 2026 08:14
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/stooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@os-zhuang@claude