Skip to content

editor: a plugin's start screen in a host chat; IconRefGlyph exported - #1043

Merged
Aymericr merged 2 commits into
mainfrom
feedback/plugin-chat-start
Oct 13, 2026
Merged

Aymericr merged 2 commits into
mainfrom
feedback/plugin-chat-start

Conversation

@Aymericr

@Aymericr Aymericr commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What

  • PluginChatExtension.start: a lazy component a host's chat shows while its thread is empty. It acts only through the new ChatStartProps:
    • send(text, images?) sends a message now, its pictures by reference;
    • attach(files) puts files on the next message, in the composer;
    • both run at the level that runs the plugin's tools;
    • requirePro() only asks whether the person's plan includes that level. It answers false after the host offered the upgrade, and changes nothing in the chat. The doc says "Pro" is the hosted product's name for that level.
  • ChatStartProps, IconRefGlyph and IconRefImage are exported from @pascal-app/editor, so a host renders registry icons the way the editor does.
  • wiki/architecture/plugin-authoring.md documents the start screen.

Types and exports only: no runtime change in the editor.

Reconciled with Bundle 2

Rebased onto editor main 18eb639 (#1024, Bundle 2), cleanly. Bundle 2 added exports next to these in packages/editor/src/index.tsx and a section next to this one in plugin-authoring.md. Nothing is dropped: Bundle 2 has no start-screen contract, and IconRefGlyph / IconRefImage were not exported yet.

Why

Owner feedback (2026-10-12), slice E-start of the Architect chat feedback plan:

  • C14: "let's look at the latest PRs from Adam (AxiomeCG) and Steven Tibbs to bring them in: I also added images in the reference folder with commentary on some Steven's feature for generative UI and DXF import."
  • C10: "introduce rich message text with interactive and icon rich highlighted entities (see image examples): tool calls, scene graph node mentions, project version mentions, and more"

Steven's Architect plugin had its own start screen (story photographs, 37 styles, build from plans) inside its own panel. The hosted chat has one empty state for every engine. This contract lets a plugin contribute its start screen there without importing the host. IconRefGlyph is the icon a host needs for plugin and entity rows.

How to test

  1. From a host checkout with this branch: bunx turbo run check-types --filter='./editor/packages/*' passes (I ran it on this head, 9/9).
  2. In a plugin's chat extension, add start: () => import('./chat-start') where the default export takes ChatStartProps. It type-checks, and import { IconRefGlyph } from '@pascal-app/editor' resolves.
  3. The hosted Community chat mounts Architect's start through this contract (pascalorg/private-editor#909). I checked it in the running app at a 288 px panel and a 390 px phone, in both themes. "Start building" and "Build from plans" run at Pro. On the Free plan every one of them opens the upgrade and keeps the brief. Opening the design studio leaves the effort where it was.

Screenshots / screen recording

N/A: no visual change in the editor (types and exports). The host's start screen is shown in its own PR.

Deployment notes

Review

Fixed:

  • requirePro() moved the chat to Pro as a side effect, so a step that only needs the plan (opening Architect's picture studio) changed the effort the next message ran at. It now only asks; send and attach are what run at the plugin's level.
  • The doc says that "Pro" is the hosted name for that level, so a self-hosted host maps it onto its own.

Rejected: none.

Checklist

  • I've tested this locally with bun dev (checked through the hosted Community dev server, not the editor's bun dev)
  • My code follows the existing code style (Biome on the changed files)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

🤖 Generated with Claude Code


Note

Low Risk
Additive API surface (optional start, new exports, docs); no runtime or auth/data-path changes in the editor package.

Overview
Adds a plugin chat empty-state contract: optional lazy start on PluginChatExtension renders while the thread has no messages, driven only by new ChatStartProps (send with ref images, attach for the composer, requirePro() as a read-only plan gate).

@pascal-app/editor re-exports ChatStartProps, IconRefGlyph, and IconRefImage so plugins can build start UIs and registry icons like the host. wiki/architecture/plugin-authoring.md documents the pattern. Types and public exports only—no editor runtime behavior in this PR; hosts wire mounting separately.

Reviewed by Cursor Bugbot for commit c348101. Bugbot is set up for automated code reviews on this repo. Configure here.

@Aymericr

Copy link
Copy Markdown
Contributor Author

The quality failure is metadata references (R3) > every metadata key an editor source reads or writes is classified: the robots / robots.index keys in apps/editor/app/embed/[id]/page.tsx. Editor main fails the same test (CI on 94591a6 and a99ebfd). This PR only adds types and exports in packages/editor.

@Aymericr
Aymericr force-pushed the feedback/plugin-chat-start branch from ff03db0 to 5ff8e21 Compare October 13, 2026 05:12
Aymericr and others added 2 commits October 13, 2026 11:15
…ported

PluginChatExtension.start is a lazy component the host's chat shows while its
thread is empty. It acts through ChatStartProps only: send a message (pictures
by reference), attach files to the composer, or requirePro() before a step
that needs the level the plugin's tools run at. IconRefGlyph and IconRefImage
are exported so a host renders registry icons the way the editor does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uirePro only asks

requirePro() moved the chat to Pro as a side effect, so a step that only
needs the plan (opening a picture studio) changed the effort the next
message ran at. It now only asks, offering the upgrade on a plan without
it; send and attach are what run at the level of the plugin's tools.
The doc says that "Pro" is the hosted product's word for that level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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