solidjs-patterns▌
different-ai/openwork · updated Apr 28, 2026
OpenWork’s UI is SolidJS: it updates via signals, not React-style rerenders.
- ›Most “UI stuck” bugs are actually state coupling bugs (e.g. one global busy() disabling an unrelated action), not rerender issues.
Why this skill exists
OpenWork’s UI is SolidJS: it updates via signals, not React-style rerenders.
Most “UI stuck” bugs are actually state coupling bugs (e.g. one global busy() disabling an unrelated action), not rerender issues.
This skill captures the patterns we want to consistently use in OpenWork.
Core rules
- Prefer fine-grained signals over shared global flags.
- Keep async actions scoped (each action gets its own
pendingstate). - Derive UI state via
createMemo()instead of duplicating booleans. - Avoid mutating arrays/objects stored in signals; always create new values.
Scoped async actions (recommended)
When an operation can overlap with others (permissions, installs, background refresh), don’t reuse a global busy().
Use a dedicated signal per action:
const [replying, setReplying] = createSignal(false);
async function respond() {
if (replying()) return;
setReplying(true);
try {
await doTheThing();
} finally {
setReplying(false);
}
}
Why
A single busy() boolean creates deadlocks:
- Long-running task sets
busy(true) - A permission prompt appears and its buttons are disabled by
busy() - The task can’t continue until permission is answered
- The user can’t answer because buttons are disabled
Fix: permission UI must be disabled only by a permission-specific pending state.
Signal snapshots in async handlers
If you read signals inside an async function and you need stable values, snapshot early:
const request = activePermission();
if (!request) return;
const requestID = request.id;
await respondPermission(requestID, "always");
Derived UI state
Prefer createMemo() for computed disabled states:
const canSend = createMemo(() => prompt().trim().length > 0 && !busy());
Lists
- Use setter callbacks for derived updates:
setItems((current) => current.filter((x) => x.id !== id));
- Don’t mutate
currentin-place.
Practical checklist (SolidJS UI changes)
- Does any button depend on a global flag that could be true during long-running work?
- Could two async actions overlap and fight over one boolean?
- Is any UI state duplicated (can be derived instead)?
- Do event handlers read signals after an
awaitwhere values might have changed? - If you refactor props/types, did you update all intermediate component signatures and call sites?
References
- SolidJS: https://www.solidjs.com/docs/latest
- SolidJS signals: https://www.solidjs.com/docs/latest/api#createsignal
- SolidJS memos: https://www.solidjs.com/docs/latest/api#creatememo
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.5★★★★★65 reviews- ★★★★★Shikha Mishra· Dec 28, 2024
solidjs-patterns fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Camila Iyer· Dec 28, 2024
I recommend solidjs-patterns for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Lucas Singh· Dec 28, 2024
Solid pick for teams standardizing on skills: solidjs-patterns is focused, and the summary matches what you get after install.
- ★★★★★Xiao Zhang· Dec 20, 2024
solidjs-patterns has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Soo Haddad· Dec 8, 2024
solidjs-patterns fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Aarav Ghosh· Nov 27, 2024
Registry listing for solidjs-patterns matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Rahul Santra· Nov 19, 2024
Registry listing for solidjs-patterns matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Sakura Yang· Nov 19, 2024
solidjs-patterns is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Diego Nasser· Nov 15, 2024
Useful defaults in solidjs-patterns — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Olivia Anderson· Nov 11, 2024
Keeps context tight: solidjs-patterns is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 65