Dispel keeps two separate layers of style storage. An active draft is a temporary, in-progress session for a hostname: it accumulates oneDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/thePrnvBot/dispel-web-stylist/llms.txt
Use this file to discover all available pages before exploring further.
cssPatch per prompt turn and exists only while you are actively working. A prompt history entry is a permanent record saved to local storage when you explicitly save a draft — it carries a name, the compiled CSS, and a URL, and it is reapplied automatically every time you visit that page. Understanding the distinction helps you work confidently without worrying about losing unsaved work or accidentally persisting unfinished changes.
Active drafts
Every time you submit a prompt on a new hostname, Dispel creates anIActiveDraft record keyed by hostname in local:activeDrafts. Each subsequent prompt on the same hostname appends a new IDraftTurn to the draft’s turns array.
cssPatch values joined together — draft.turns.map(t => t.cssPatch).join("\n") — which means every turn’s output is additive and the latest turn’s stylesheet supersedes any conflicting rules from earlier turns. The full compiled CSS is also passed back to the model as CURRENT STYLES context on each new prompt, so the model always outputs a complete replacement sheet rather than a partial diff.
Active drafts are stored in
local:activeDrafts (extension local storage). They persist across browser sessions until you save or discard them, so your in-progress work survives a browser restart.Saving a draft
When you are happy with the result, click Save in the side panel. A dialog asks you to give the style change a name — this becomes theprompt field on the saved entry and the title shown in the prompt history list.
The saveDraftWorkflow executes the following steps in order:
Extract the last CSS patch
Calls
getLastCssPatch(draft) — takes draft.turns.at(-1)?.cssPatch — as the canonical CSS to save. This is the most recent complete stylesheet produced by the session.Create a PromptEntry
Constructs a new
IPromptEntry with a fresh crypto.randomUUID() id, your chosen title as the prompt, the CSS, the tab’s URL, the current timestamp, and applied: true.Prepend to prompt history
Prepends the new entry to
promptHistoryStorage so it appears at the top of the history list.Remove the active draft
Deletes the draft from
local:activeDrafts for this hostname — the session is now finalised.Discarding a draft
To throw away the current session without saving, click Discard. ThediscardDraftWorkflow first calls reloadSavedStyles to revert the page to whatever was previously saved, then removes the draft from local:activeDrafts.
Prompt history
Saved styles are stored as an array ofIPromptEntry items in promptHistoryStorage. The schema is:
PromptItem. From there you can:
Toggle on / off
Click Unapply to hide the styles from the page without deleting the entry (
applied flips to false). Click Apply to re-enable it. Only entries where applied !== false are compiled into the page on load.Inspect the CSS
Expand an entry to see a syntax-highlighted code block of the saved CSS. Useful for debugging which rule is responsible for a particular style.
Delete permanently
Click the trash icon to remove an entry from history entirely. This is irreversible.
Per-URL filtering
getEntriesForHostname filters history to entries whose url hostname matches the current tab’s hostname, so the store always shows only styles relevant to the page you are on.Style reapplication on page load
When you navigate to a page, the Dispel content script sends aREFRESH_STYLES message to the background service worker. The background looks up all IPromptEntry items for the current hostname where applied !== false, compiles their CSS in chronological order, and injects it into the page — typically before the first paint. This is how Dispel achieves per-site style memory without requiring any page-side code changes.
External CSS warning
After every prompt turn, Dispel scans the generated CSS for external resource references usingdetectExternalSources. The detector looks for four patterns:
data:) and fragment-only references (#) are excluded. If any external URL is found, Dispel immediately reverts the page to its previously saved styles and shows a warning dialog listing the detected URLs. The dialog asks you to either:
- Accept — re-apply the CSS with the external references and save the turn anyway (the warning is dismissed for the rest of the session).
- Reject — dismiss the dialog; the revert has already been applied and the draft turn is discarded.
The system prompt instructs the model to avoid external resources unless you explicitly request them. The warning dialog is a safety net for cases where the model includes a remote font or CDN asset despite that instruction.