feat: Add GlowTrack mood and habit wellbeing grid specifications
- Introduced export schema for JSON data structure. - Created renderer contract detailing canvas/SVG rendering requirements. - Defined IndexedDB storage schema and migration strategies. - Documented data model including entities and relationships. - Developed implementation plan outlining execution flow and project structure. - Provided quickstart guide for development environment setup. - Compiled research documentation on performance, accessibility, and theming. - Established feature specification with user scenarios and functional requirements.
This commit is contained in:
41
specs/001-glowtrack-a-mood/research/01-viz-performance.md
Normal file
41
specs/001-glowtrack-a-mood/research/01-viz-performance.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# Research: Canvas/SVG Performance on Mobile
|
||||
|
||||
## Hypothesis
|
||||
We can sustain 60 fps for 150–365 tiles with glow/overlay on mid-range devices by batching draws and minimizing per-frame allocations.
|
||||
|
||||
## Questions
|
||||
- FPS across tile counts (30, 90, 180, 365) and DPR (1.0, 2.0, 3.0)
|
||||
- Cost of static overlay and glyph rendering
|
||||
- Breakpoints for reduced motion or static rendering
|
||||
|
||||
## Method
|
||||
- Use `/packages/viz/poc/index.html` harness
|
||||
- Test devices: low-end Android, mid Android, iPhone
|
||||
- Record FPS and memory; profile with devtools
|
||||
|
||||
## Test Matrix (fill during runs)
|
||||
| DPR | Animate | Tiles | FPS | Notes |
|
||||
|-----|---------|-------|-----|-------|
|
||||
| 1 | false | 30 | | |
|
||||
| 1 | false | 90 | | |
|
||||
| 1 | false | 180 | | |
|
||||
| 1 | false | 365 | | |
|
||||
| 1 | true | 30 | | |
|
||||
| 1 | true | 90 | | |
|
||||
| 1 | true | 180 | | |
|
||||
| 1 | true | 365 | | |
|
||||
| 2 | false | 30 | | |
|
||||
| 2 | false | 90 | | |
|
||||
| 2 | false | 180 | | |
|
||||
| 2 | false | 365 | | |
|
||||
| 2 | true | 30 | | |
|
||||
| 2 | true | 90 | | |
|
||||
| 2 | true | 180 | | |
|
||||
| 2 | true | 365 | | |
|
||||
|
||||
## Acceptance
|
||||
- 55–60 fps at 180 tiles on mid devices
|
||||
- Document fallback thresholds and settings
|
||||
|
||||
## Deliverables
|
||||
- Metrics table; recommendations for renderer design
|
||||
@@ -0,0 +1,31 @@
|
||||
# Research: IndexedDB Imports & Migrations
|
||||
|
||||
## Hypothesis
|
||||
Chunked transactions and store-per-entity design yield responsive imports and safe migrations for 3-year datasets.
|
||||
|
||||
## Questions
|
||||
- Import throughput (items/sec) for days vs entries
|
||||
- Optimal chunk size per transaction
|
||||
- Quota usage for 3-year dataset
|
||||
- Migration time and error handling patterns
|
||||
|
||||
## Method
|
||||
- Use `/packages/storage/poc/import-benchmark.html`
|
||||
- Measure timings, DB size; simulate version bump
|
||||
|
||||
## Test Matrix (fill during runs)
|
||||
| Chunk | Days(ms) | Entries(ms) | Notes |
|
||||
|-------|----------|-------------|-------|
|
||||
| 100 | | | |
|
||||
| 250 | | | |
|
||||
| 500 | | | |
|
||||
| 1000 | | | |
|
||||
| 2000 | | | |
|
||||
| 5000 | | | |
|
||||
|
||||
## Acceptance
|
||||
- Import < 5s for 3-year synthetic dataset on mid device
|
||||
- Migrations complete without UI lockup and preserve data
|
||||
|
||||
## Deliverables
|
||||
- Import strategy, migration template, data integrity checklist
|
||||
@@ -0,0 +1,20 @@
|
||||
# Research: Accessibility Palettes & Glyph Legibility
|
||||
|
||||
## Hypothesis
|
||||
CSS variable-driven palettes can satisfy WCAG AA while remaining legible for common color-blind conditions.
|
||||
|
||||
## Questions
|
||||
- Contrast ratios for default and high-contrast themes
|
||||
- Visibility of mood hue under protanopia/deuteranopia/tritanopia
|
||||
- Glyph legibility at small tile sizes
|
||||
|
||||
## Method
|
||||
- Prototype palettes; run through color-blind simulators and Axe
|
||||
- Validate glyph size/contrast on sample tiles
|
||||
|
||||
## Acceptance
|
||||
- AA contrast for focus indicators and glyphs
|
||||
- Verified palettes for three color-blind modes
|
||||
|
||||
## Deliverables
|
||||
- Approved palettes, token list, glyph sizing guidance
|
||||
@@ -0,0 +1,19 @@
|
||||
# Research: PWA SW Updates & Offline Write Safety
|
||||
|
||||
## Hypothesis
|
||||
With cache versioning and cautious update prompts, we can avoid data loss during app updates and schema bumps while offline.
|
||||
|
||||
## Questions
|
||||
- Best timing for SW activation without disrupting writes
|
||||
- Handling schema migrations when a stale SW is cached
|
||||
- Safe rollback strategy
|
||||
|
||||
## Method
|
||||
- Simulate offline state; bump schema; observe SW activation and data integrity
|
||||
|
||||
## Acceptance
|
||||
- No data loss or corruption across update/migration
|
||||
- Clear UX for update available and post-update state
|
||||
|
||||
## Deliverables
|
||||
- SW update policy, cache naming, migration/rollback checklist
|
||||
@@ -0,0 +1,19 @@
|
||||
# Research: PNG Export Fidelity & Limits
|
||||
|
||||
## Hypothesis
|
||||
Canvas toBlob can reliably export year-scale grids at screen resolution with acceptable memory and time on mid devices.
|
||||
|
||||
## Questions
|
||||
- toBlob vs toDataURL performance/memory
|
||||
- Max safe export dimensions before OOM
|
||||
- Glyph/text crispness at DPR > 1
|
||||
|
||||
## Method
|
||||
- Extend viz harness to export PNG; measure time and size
|
||||
|
||||
## Acceptance
|
||||
- Export < 2s for year grid at scale 1.0 on mid device
|
||||
- Document caps and UX messaging for long exports
|
||||
|
||||
## Deliverables
|
||||
- Export pipeline guidance; caps; progress/error UX recommendations
|
||||
19
specs/001-glowtrack-a-mood/research/06-keyboard-sr-grid.md
Normal file
19
specs/001-glowtrack-a-mood/research/06-keyboard-sr-grid.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Research: Keyboard-first Grid & Screen Reader UX
|
||||
|
||||
## Hypothesis
|
||||
A roving tabindex grid with appropriate ARIA roles can provide intuitive keyboard navigation and informative SR output.
|
||||
|
||||
## Questions
|
||||
- Best roles: grid vs listgrid vs table
|
||||
- Roving tabindex vs per-cell tab stops
|
||||
- SR announcement strings for date, mood, positive/negative counts
|
||||
|
||||
## Method
|
||||
- Create minimal prototype; test with Axe and at least one SR (NVDA/VoiceOver)
|
||||
|
||||
## Acceptance
|
||||
- Arrow navigation works; SR reads context and counts
|
||||
- Meets WCAG AA navigability and focus visibility
|
||||
|
||||
## Deliverables
|
||||
- ARIA mapping and strings; nav model; test checklist
|
||||
18
specs/001-glowtrack-a-mood/research/07-tailwind-css-vars.md
Normal file
18
specs/001-glowtrack-a-mood/research/07-tailwind-css-vars.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Research: Tailwind & CSS Variables Theming
|
||||
|
||||
## Hypothesis
|
||||
We can keep CSS output small while supporting dynamic theming via CSS variables and Tailwind utilities.
|
||||
|
||||
## Questions
|
||||
- Mapping CSS variables to Tailwind utilities without bloating CSS
|
||||
- Safe patterns for dynamic classes and purge
|
||||
- Runtime theme switching performance cost
|
||||
|
||||
## Method
|
||||
- Prototype theme tokens and a toggle; inspect CSS size
|
||||
|
||||
## Acceptance
|
||||
- Minimal CSS growth; smooth theme switching
|
||||
|
||||
## Deliverables
|
||||
- Token design, Tailwind config guidance, sample components
|
||||
Reference in New Issue
Block a user