feat(signage): import plugins from a frontend repository (PPT-2814) - #310
Merged
Merged
Conversation
Add an import wizard next to manual plugin entry. It lists the HTML files in an interface repository, loads each in a sandboxed off-screen iframe, and lists the files that report as plugins. Selecting one opens the new plugin form with name, URI and type filled in. Bump @placeos/ts-client to 6.5.0 for listRepositoryFiles. Refs PPT-2814 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
To add a signage plugin, an admin must type its URI by hand. The backend can now list the HTML files in an interface repository (
GET /repositories/{id}/files), and plugins now report their type. Backoffice does not use either yet.Jira: PPT-2814. The recording is on the Jira issue.
Fix
*.htmlfiles withlistRepositoryFiles, then loads each file in an off-screen iframe (6 at a time, 10 s timeout) and waits for the SDKloadedmessage.sandbox="allow-scripts"only. Unknown HTML files in the repository get an opaque origin and cannot get to the admin session. The SDK posts with target origin*, so plugins still answer.@placeos/ts-clientto 6.5.0 forlistRepositoryFilesand the new types.Checks
bun run test:ci: 80 files, 940 tests pass. New tests cover the probe (loaded, wrong source, fatal error, abort, type default, blank name) and the concurrency limit.bun run lint,tsc,bun run build: pass.place-labs/signage-plugin-templates: 8 of 9 HTML files are listed with the correct types (validator.htmlis excluded). Selectingyoutube-playeropens the form with the fields filled in.Note: the dev proxy does not forward repository folders (for example
/signage-plugins/), so onlocalhost:4200against a remote backend the probes time out. This is the same as the existing plugin test modal.Made by Claude Opus 5.5 (1M context) in Claude Code (T3 Code).
🤖 Generated with Claude Code