Page:
Adding Things
Pages
AI Use Disclosure
Adding Things
Architecture
Author
Background Worker
Code Layout
Command Line Modes
Common Pieces
Components and Contracts
Configuration
Database
Dev Login
Discord
Features
Frontend Layout
Frontend
Home
Installation
Logging
Look and Feel
Notifications
Performance Principles
Roadmap
Running
SSO Flow
Security
Static Data
Swap Lifecycle
Swarm Cache
Token Refresh and Caching
Updating
No results
2
Adding Things
Nate edited this page 2026-11-21 20:21:39 -08:00
Table of contents
Adding things
- A nav item: add the entry to
sectionNav(nav.go) and the matching line toquickJumpPages(app.js), same label, Title Case. The parity test checks you. - A page: template in
templates/, route + section wiring, and if it needs its own JS, a per-surface file gated in base.html on the section or NavPage. No executable inline scripts in templates: CSP serves scripts from 'self' only. The single inline pattern is a<script type="application/json">data block (the planner'splan-data), which is data, not code. - A JS widget: a banner section in the surface's file (the
// --- Name ---banners are the table of contents), anonReadysubscription scoped toroot, teardown on will-swap for anything global, and a node test ininternal/app/jstest/if it carries logic worth pinning: the pipeline's JS step names its files explicitly, so add new test files to.gitlab-ci.ymland.github/workflows/heavy-gates.ymltoo. - A home widget: manifest entry, registry entry, template block keyed by widget id, data from a stored source. Follow an existing widget end to end; the trade-ideas module is a recent complete example.
Testing
Mirror CI exactly before pushing: make assets, gofmt -l cmd internal, go vet ./..., go test ./..., and the node list
from the workflow. Tests ship in the same commit as the behavior
change: every historical CI failure here was tests lagging the
code, never the reverse. While iterating, run the affected
package only; run the full gate once, on the final tree.
Don'ts
- No bundler, TypeScript, or npm dependency for the shipped front end (see "The model"). Native language features only.
- No new global namespace.
window.EveSynapseContentandwindow.EveSynapseModalare the existing surface; extend those patterns rather than minting another. - No document-level listener or timer without a will-swap teardown or a bind-once guard.
- No fetching at render what ingest could have stored.
- No inline event handlers or executable inline scripts in templates (JSON data blocks are the one exception).
- No second implementation of anything in "The common pieces".