Skip to content

Add loaded dialog prototype - #9

Merged
mdroidian merged 1 commit into
mainfrom
agent/add-loaded-dialog-prototype
Aug 17, 2026
Merged

Add loaded dialog prototype#9
mdroidian merged 1 commit into
mainfrom
agent/add-loaded-dialog-prototype

Conversation

@mdroidian

Copy link
Copy Markdown
Member

Summary

  • add a new loaded-dialog Roam developer-extension prototype
  • show a Blueprint-backed alert when the extension loads
  • document the prototype and include the generated workspace configuration

Why

This provides a minimal installable prototype that visibly confirms successful extension loading.

User impact

Loading the extension opens a dialog that says the extension loaded successfully and provides a single Got it action. The shared runExtension lifecycle owns and cleans up the mounted alert.

Validation

  • pnpm test
  • pnpm build
  • pnpm prepare:artifacts

@github-actions

Copy link
Copy Markdown

Roam prototype previews

The preview deployment is ready. Paste a URL below into Load Developer Extensions from URL in Roam:

View publishing details

@mdroidian
mdroidian marked this pull request as ready for review August 17, 2026 03:04
@mdroidian
mdroidian merged commit e91be5d into main Aug 17, 2026
1 check passed
@mdroidian
mdroidian deleted the agent/add-loaded-dialog-prototype branch August 17, 2026 03:04

@devin-ai-integration devin-ai-integration 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.

Devin Review found 1 potential issue.

Open in Devin Review

Comment on lines +5 to +10
export default runExtension(async () => {
await renderAlert({
content: "Loaded Dialog has loaded successfully.",
confirmText: "Got it",
});
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Dialog can stay on screen after the extension is turned off

The confirmation dialog is opened without keeping any handle to close it (renderAlert(...) at prototypes/loaded-dialog/src/index.ts:6-9) and no cleanup step is returned, so a dialog still on screen when the extension is disabled or reloaded stays there forever.
Impact: A user who disables or reloads the extension while the dialog is open is left with a stuck dialog, and reloading repeatedly can stack leftover dialogs.

Overlay mount is never registered with the runExtension lifecycle

roamjs-components/components/SimpleAlert's render is built with createOverlayRender, which appends its own container to the document and returns an unmount function. The prototype discards that return value and, unlike the scaffold template (packages/extension-base/template/src/index.ts:17-21), does not return an unload handler from the runExtension callback, so nothing removes the container or unmounts the React tree at unload time. AGENTS.md requires "Dispose observers, listeners, commands, timers, and mounted UI when the extension unloads", and packages/extension-base/skills/react-rendering/SKILL.md:23 requires owned React roots/containers to be registered for cleanup. The PR description's claim that runExtension owns the mounted alert does not hold because the overlay is mounted outside the registry.

Suggested change
export default runExtension(async () => {
await renderAlert({
content: "Loaded Dialog has loaded successfully.",
confirmText: "Got it",
});
});
export default runExtension(async () => {
const unmountAlert = renderAlert({
content: "Loaded Dialog has loaded successfully.",
confirmText: "Got it",
});
return {
unload: () => {
unmountAlert?.();
},
};
});
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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