frontend-patterns

Solid

React/TypeScript/xterm.js patterns for ClaudeTerminal frontend

Web & Frontend 39 stars 9 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
53
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
46
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Frontend Patterns for ClaudeTerminal ## xterm.js Lifecycle - Create terminal instance in useEffect, dispose on unmount - Dispose all addons (fit, search, weblinks) before terminal - Never hold references to disposed terminals ## Event Listeners - `listen()` returns unlisten function - call it in useEffect cleanup - Register listeners in App.tsx for global events (terminal-output, terminal-finished) ## Zustand - `terminalStore` - NOT persisted (terminals are ephemeral) - `appStore` - persisted to localStorage (UI state) - Use selectors to avoid unnecessary re-renders - Avoid stale closures - use `getState()` in callbacks ## IPC - Always wrap `invoke()` in try/catch - Handle both success and error cases - Show loading states for slow operations ## Styling - Dark glassmorphic theme: `bg-gray-800/80`, `border-gray-700/50`, `backdrop-blur` - Use Tailwind classes - no hardcoded colors - Framer Motion for animations

Details

Author
talayash
Repository
talayash/agentrium
Created
7 months ago
Last Updated
2 weeks ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category