Elm add panel

From JonLatane/jonline · View interactive version

Elm add panel is an AI agent skill from the GitHub repository JonLatane/jonline. Add a new app-wide "Shared panel" (like Accounts/Starred Posts/Markdown) to the Elm SPA (frontends/elm-spa). Use when asked to add a new global overlay/panel driven from Shared.Model, not page-local state.

How to use this skill

Skill file

Rellm's Elm SPA has a handful of app-wide overlay panels (Accounts Panel, Starred Posts Panel, Admin Panel, Markdown Panel) that live in Shared.Model rather than any one page, so they're available everywhere and survive route changes. There's no central "list of panels" registry — each one is wired by hand into Shared.elm and UI.elm following the same shape. Add a new one the same way.

1. The panel module itself

New file: frontends/elm-spa/src/Shared/<Name>Panel.elm, exposing Model, Msg(..), init, update, view (and whatever helpers callers need).

2. Wiring into `Shared.elm`

Mechanical, copy the shape of the existing StarredPostsPanelMsg/MarkdownPanelMsg branches:

3. Mounting the view in `UI.elm`

Two patterns depending on how the panel opens:

4. CSS

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.