7. Functional Requirements
Functional Requirements requirements from the authoritative Glitchpad Technical Specification.
- TS-FR-001: The application MUST open sources from desktop dialogs, drag-and-drop, command-line or association delivery, and Android view, open-document, create-document, and share intents where applicable.
- TS-FR-002: Opening a source with an identity equal to an existing session MUST focus the existing tab; uncertain identities MUST remain separate.
- TS-FR-003: The active document MUST receive at least 90 percent of the application client area at the 1280 by 800 desktop reference viewport when contextual drawers are closed.
- TS-FR-004: Tabs MUST remain compact, show name and dirty state, support reorder and keyboard switching, and provide bounded overflow without adding a workspace surface.
- TS-FR-005: The metadata inspector MUST be dismissible, preserve document context, and distinguish unavailable, unsupported, redacted, pending, and errored facts.
- TS-FR-006: Format detection MUST use bounded content evidence and MUST NOT trust an extension or externally claimed MIME type as sole authority.
- TS-FR-007: Editable text MUST preserve the accepted encoding, BOM, newline pattern, terminal newline, and undecodable-byte decision.
- TS-FR-008: Save MUST revalidate the external revision and MUST reject a stale write as a conflict.
- TS-FR-009: Close, reload, source revocation, deletion, rename, and abnormal termination MUST preserve dirty content until the user explicitly saves, discards, or declines recovery.
- TS-FR-010: Renderer controls MUST be derived from the active renderer's advertised capabilities.
- TS-FR-011: Every renderer MUST support cancellation, deterministic disposal, malformed-input reporting, resource-limit reporting, and metadata provenance.
- TS-FR-012: Markdown MUST render locally, sanitize generated output, disable raw HTML, and prevent remote resource loading.
- TS-FR-013: Text/source editing MUST provide line numbers, undo/redo, find and replace, go-to-line, wrapping, indentation, encoding/newline visibility, and lazy syntax highlighting without IDE services.
- TS-FR-014: Image viewing MUST support bounded zoom and pan; animated formats MUST expose pause and frame state; ICO MUST expose every embedded image entry.
- TS-FR-015: PDF viewing MUST provide virtualized pages, text search, thumbnails, document outline navigation, page labels, zoom, rotation, internal links, printing, and metadata without executing PDF JavaScript.
- TS-FR-016: DOCX and ODT viewing MUST report unsupported constructs and MUST NOT execute macros, formulas, scripts, or external references.
- TS-FR-017: External links MUST open through the operating system only after scheme validation and explicit user action.
- TS-FR-018: The application MUST remain functional without network access and MUST issue no implicit document-content request.
- TS-FR-019: Crash recovery MUST snapshot dirty editable text, enforce private-storage quotas, expire records after seven days, and remove records after confirmed save or discard.
- TS-FR-020: A malformed, encrypted, oversized, inaccessible, unsupported, or revoked source MUST produce a stable user-visible result without crashing the process.
- TS-FR-021: Every official artifact MUST contain license and notice material, expose the exact product version, and pass install/open/core-action/uninstall smoke tests.
- TS-FR-022: Every product change MUST include a documentation-impact declaration and follow the repository-installed Spec Kit workflow.
- TS-FR-023: Mermaid MUST support standalone
.mmdand.mermaiddocuments plus fenced Markdown blocks through one local renderer contract; standalone source MUST be editable and conflict-safe, each embedded block MUST fail independently, authored source and direction MUST remain unchanged, and scripts, callbacks, automatic links, remote resources, and document-content network requests MUST remain disabled.