Skip to content

[KZN-17590] - security validation checks & support views as setup assistants - #18

Merged
keegandonley merged 3 commits into
mainfrom
feature/KZN-17590-security-validation-checks
Aug 22, 2026
Merged

[KZN-17590] - security validation checks & support views as setup assistants#18
keegandonley merged 3 commits into
mainfrom
feature/KZN-17590-security-validation-checks

Conversation

@keegandonley

@keegandonleykeegandonley commented Aug 20, 2026

Copy link
Copy Markdown
Member

This PR introduces the new security validation checks into the builder, and also adds support for views as setup assistant to the plugin viewer

@keegandonleykeegandonley changed the title [KZN-17590] - security validation checks[KZN-17590] - security validation checks & support views as setup assistantsAug 20, 2026
@keegandonley
keegandonley requested review from mauricebecnel400 and a lite review from CopilotAugust 20, 2026 16:47

CopilotAI 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.

Pull request overview

This PR updates the CLI/viewer to support newer Engine/Packager capabilities (including view-based setup assistants) and tightens report generation and local file scanning, while also updating user-facing command instructions to the npx --yes @kizenapps/cli … invocation style.

Changes:

  • Add view-based setup assistant support in the viewer (configuration + sandbox hosting) via shared PluginViewContent, usePluginConfig, and useCompleteSetup.
  • Centralize toast UI into a reusable ToastProvider/PluginToast and remove legacy toast context implementation.
  • Improve report output robustness (markdown fencing) and readLocalFiles binary detection; bump @kizenapps/engine/@kizenapps/packager and project version.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
viewer/src/ToastContext.tsxNew toast controller/provider with auto-dismiss behavior.
viewer/src/ToastContext.tsRemoves legacy toast context API.
viewer/src/pages/SummaryPage.tsxUpdates build command hint to npx --yes @kizenapps/cli build.
viewer/src/pages/SandboxPage.tsxRefactors sandbox host to use ToastProvider, usePluginConfig, and useCompleteSetup.
viewer/src/pages/ConfigurationPage.tsxAdds view-based setup assistant rendering and integrates modal/toast/config hooks.
viewer/src/pages/CodeStepsPage.tsxSwitches whenState derivation to usePluginConfig.
viewer/src/pages/AppDetailPage.tsxUpdates setup-assistant artifact summary to handle view-based assistants.
viewer/src/lib/setupAssistant.tsAdds helpers for detecting/reading view-based setup assistants.
viewer/src/lib/constants.tsAdds shared PLUGIN_IFRAME_ALLOW constant.
viewer/src/lib/configStorage.tsAdds replaceClean* helpers and removes resolveEffectiveConfig.
viewer/src/hooks/usePluginConfig.tsNew shared hook for config args, user configs, and whenState.
viewer/src/hooks/useCompleteSetup.tsNew host implementation for engine completeSetup that persists config locally.
viewer/src/components/RoutablePageBrowser.tsxReplaces custom view rendering with shared PluginViewContent.
viewer/src/components/PluginViewContent.tsxNew shared component/hook to render script/html/iframe plugin views.
viewer/src/components/PluginToast.tsxNew toast UI component.
viewer/src/components/Modal.tsxRefactors custom view modal content to reuse PluginViewContent.
src/ui/CreateUI.tsxUpdates dev command hint to npx --yes @kizenapps/cli dev.
src/lib/readFiles.tsExpands skipped dirs and adds optional binary detection by content.
src/index.tsUpdates CLI display name to the npx @kizenapps/cli form.
src/commands/report.tsImproves markdown fencing, filters license files, enables binary sniffing.
src/commands/encrypt.tsUpdates example invocation to npx --yes @kizenapps/cli encrypt ….
pnpm-lock.yamlLocks updated dependency versions (engine/packager) and transitive adds.
package.jsonBumps package version and updates engine/packager dependency versions.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +13 to +17
export interface ToastPayload {
message: string;
variant?: 'success' | 'failure' | 'alert';
autohide?: boolean;
}
Comment on lines +23 to +27
<div
className={`fixed top-4 left-1/2 -translate-x-1/2 z-20 rounded px-4 py-2 text-sm font-medium ${
VARIANT_CLASSES[toast.variant ?? 'success'] ?? DEFAULT_VARIANT_CLASSES
}`}
>
Comment on lines +3 to +6
export interface PluginToastPayload {
message: string;
variant?: string;
}

@mauricebecnel400mauricebecnel400 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.

LGTM

@keegandonley
keegandonley merged commit 0a9fae5 into mainAug 22, 2026
3 checks passed
Sign up for freeto 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

@keegandonley@mauricebecnel400