dev-testing-frontend
Skill179 starsChanged 12 days agoApache-2.0View on GitHub
Testing the Capsem frontend. Use when writing frontend tests, running type checks, or doing visual verification with Chrome DevTools MCP.
In this repository37 other files it gives its agents.
- AGENTS.mdAGENTS.md
- asset-pipelineSkill
- build-imagesSkill
- build-initrdSkill
- citadelSkill
- dev-benchmarkSkill
- dev-bug-reviewSkill
- dev-cacheSkill
- dev-capsem-doctorSkill
- dev-capsemSkill
- dev-ciSkill
- dev-debuggingSkill
- dev-gateSkill
- dev-installationSkill
- dev-justSkill
- dev-mcpSkill
- dev-mitm-proxySkill
- dev-rust-patternsSkill
- dev-session-debugSkill
- dev-setupSkill
- dev-skillsSkill
- dev-sprintSkill
- dev-startSkill
- dev-testing-hypervisorSkill
- dev-testing-pythonSkill
- dev-testingSkill
- dev-testing-vmSkill
- frontend-designSkill
- ironbankSkill
- meta-find-skillsSkill
- meta-organize-skillsSkill
- meta-skill-creationSkill
- release-processSkill
- site-architectureSkill
- site-infraSkill
- site-marketingSkill
- use-capsemSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 2 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
All three run as part of just test.
- Very specific: line 44
Use the schema-generation owner included in just test.
- Very specific: line 52
Start just dev ui (if not already running)
- Distinctive: line 57
If the change affects multiple views or layout, screenshot all views (Terminal, Sessions, Network, Settings)
- Distinctive: line 58
Check console again after navigation for new errors
- Very specific: line 63
All settings from config/settings/ui-metadata.generated.json are present.
- Very specific: line 73
When modifying config/settings/ui-metadata.generated.json or regenerating mock-settings.generated.ts:
- Very specific: line 74
Use the schema-generation owner included in just test
- Very specific: line 78
Check that setting counts match (grep mockSettings.find in generated file)
- Very specific: line 87
Read references/svelte5.md for Svelte 5 patterns and the @sveltejs/mcp CLI for doc lookups.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frontend Testing
Stack
Astro 7 + Svelte 5 (runes only) + Tailwind v4 + Capsem-owned semantic CSS + LayerChart v2.
Running tests
pnpm --dir web/app run check # astro check + svelte-check
pnpm --dir web/app exec vitest run --coverage
pnpm --dir web/app run build # Production bundleAll three run as part of just test. The production build is important -- Tailwind v4's Vite plugin can miss client:only components in the SSR module graph, so @source directives in global.css must explicitly include .svelte and .ts files.
Test files
Tests live in web/app/src/lib/__tests__/. Use vitest with standard patterns:
import { describe, it, expect } from 'vitest';Browser and test data
Browser and Tauri sessions both use the real gateway through the SDK in
api.ts. The absence of window.__TAURI_INTERNALS__ does not enable mock
responses. Start the real service and gateway for browser acceptance, or
explicitly supply a hermetic test transport in unit tests.
just dev ui starts the frontend; its API requests use the gateway. Stopped
fixture sessions can exercise UI states without booting a VM, but cannot
establish working guest execution or credential connection flows.
Generated test data: mock-settings.generated.ts is produced by
build_system/scripts/build/generate_schema.py from the canonical settings
metadata. It supports explicit test fixtures, not an automatic browser mode.
Use the schema-generation owner included in just test; never hand-edit it.
Visual verification with Chrome DevTools MCP
Every UI change requires visual verification via Chrome DevTools MCP. No exceptions. Type checks and unit tests pass on broken UIs all the time. The only way to know the UI actually works is to look at it.
Workflow for every UI change
- Start
just dev ui(if not already running) navigate_pagetohttp://localhost:5173list_console_messagestypes=["error","warn"] -- expect zero- Navigate to the view(s) affected by your change
take_screenshoteach affected view -- visually confirm it renders correctly- If the change affects multiple views or layout, screenshot all views (Terminal, Sessions, Network, Settings)
- Check console again after navigation for new errors
Settings view
Click through every section (AI Providers, Repositories, Security, VM, Appearance). Verify:
- All settings from
config/settings/ui-metadata.generated.jsonare present; derive the expected settings from that metadata instead of copying a count - Provider toggle enables/disables child settings visually
- API key reveal button works (password <-> text)
- VM Resources section shows all resource settings including min_content_sessions
- Theme toggle switches live
- Lint warnings display inline
After changing TOML configs or generated mock data
When modifying config/settings/ui-metadata.generated.json or regenerating mock-settings.generated.ts:
- Use the schema-generation owner included in
just test - Start
just dev ui - Navigate to Settings view
- Screenshot and verify new/changed settings appear correctly
- Check that setting counts match (grep
mockSettings.findin generated file)
Color rules (firm)
- Blue (
info) = positive (allowed, running, ok). No green in UI chrome. - Purple (
secondary) = negative (denied, stopped, error). No red in UI chrome. - Terminal emulation colors (xterm green) are fine -- that's xterm, not UI.
Svelte 5 reference
Read references/svelte5.md for Svelte 5 patterns and the @sveltejs/mcp CLI for doc lookups.
Gotchas
vm-state-changedpayload is{ state, trigger }(object), not a plain string- Dynamic Svelte components: use
<svelte:component this={item.icon} />, not<item.icon /> - Tailwind v4 +
client:only: needs@sourcedirectives to scan Svelte files - The semantic theme is checked in at
src/styles/capsem-theme.css; tests must reject any Preline package,node_modules/prelinescan, upstream CSS import, JS plugin,data-hs-*attribute, orHSStaticMethodsuse.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

