Summon v0.8.0 - Developer Experience (DX)
Focus: Tooling to make Summon a joy to use. Goal: Provide a world-class development environment comparable to React/Vue ecosystems.
21. Visual Component Inspector
Requirement: A tool to inspect the running component hierarchy. Technical Specs:
- Tree View: Visualize the component tree structure.
- Props & State: View current values of parameters and internal state for selected components.
- Highlighting: Visually highlight components in the UI when selected in the tree.
- Live Editing: Modify state/props values and see immediate updates.
- Implementation: Browser extension or overlay injected into the debug build.
22. Time-Travel Debugging
Requirement: Record state changes and replay them. Technical Specs:
- State Recording: Log all state mutations in a central store or tracked ViewModels.
- Timeline: UI to scrub back and forth through the history of state changes.
- Action Replay: Ability to re-execute actions to reproduce bugs.
- Export/Import: Save session state to a file for sharing debug contexts.
23. Component Test Harness
Requirement: Utilities for unit testing UI components in isolation. Technical Specs:
- Test Rule: JUnit rule or equivalent to set up the test environment.
- Finder APIs: Semantics-based finders (
onNodeWithText, onNodeWithTag).
- Assertions: Assertions for visibility, text content, and state.
- Actions: Simulate user interactions (click, type, scroll).
- Environment: Run tests in a headless browser or simulated environment.
24. Snapshot Testing
Requirement: Visual regression testing. Technical Specs:
- Capture: Render a component to an image or a serialized text representation of the semantic tree.
- Comparison: Compare the output against a stored "golden" master file.
- Diffing: Generate visual diffs when tests fail.
25. Error Overlay
Requirement: User-friendly display of runtime errors during development. Technical Specs:
- Global Handler: Catch unhandled exceptions in the UI thread.
- Overlay UI: Display the error message and stack trace on top of the application.
- Source Mapping: Map stack traces back to original Kotlin source files.
- Editor Integration: Links to open the file at the specific line number in the IDE.
- Verified Source Viewer: Support mapping to verified source viewer for debugging deployed code.
26. Code Coverage (Kover)
Requirement: Enforce test coverage standards across the codebase. Technical Specs:
- Integration: Apply Kover Gradle plugin to all modules.
- Configuration: Set up merged reports for multi-module projects.
- Enforcement: Fail CI builds if branch coverage drops below 80%.
- Exclusions: Configure exclusions for generated code or platform-specific bindings where appropriate.
27. API Documentation (Dokka)
Requirement: Generate comprehensive, versioned API documentation. Technical Specs:
- Integration: Apply Dokka Gradle plugin.
- Format: Generate HTML output compatible with GitHub Pages.
- Content: Ensure all public APIs have KDoc with
@sample links to example code.
- Versioning: Maintain documentation for previous versions.