Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ jobs:
robolectric-

- name: Run unit tests and generate coverage report
run: ./gradlew testDebugUnitTest jacocoTestReport --stacktrace --max-workers=4 --no-build-cache
run: ./gradlew testDebugUnitTest testNoSentryDebugUnitTest jacocoTestReport --stacktrace --max-workers=4 --no-build-cache

- name: Upload unit test results
if: always()
Expand Down
11 changes: 8 additions & 3 deletions .planning/REQUIREMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Requirements for this bug fix milestone. Each maps to roadmap phases.

- [x] **ANNOUNCE-01**: Clear All Announces preserves contacts in My Contacts

### Offline Maps (#354)

- [x] **OFFLINE-MAP-01**: Offline maps render correctly after extended offline periods

## v2 Requirements

Deferred bug fixes to address in a future milestone.
Expand Down Expand Up @@ -55,12 +59,13 @@ Which phases cover which requirements.
| RELAY-01 | Phase 2 | Pending |
| RELAY-02 | Phase 2 | Pending |
| ANNOUNCE-01 | Phase 2.1 | Complete |
| OFFLINE-MAP-01 | Phase 2.2 | Complete |

**Coverage:**
- v1 requirements: 6 total
- Mapped to phases: 6
- v1 requirements: 7 total
- Mapped to phases: 7
- Unmapped: 0

---
*Requirements defined: 2026-01-24*
*Last updated: 2026-01-27 after phase 2.1 completion*
*Last updated: 2026-01-27 after phase 2.2 completion*
18 changes: 18 additions & 0 deletions .planning/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This milestone addresses two high-priority bugs reported after the 0.7.2 pre-rel
- [x] **Phase 1: Performance Fix** - Investigate and fix UI stuttering and progressive degradation
- [ ] **Phase 2: Relay Loop Fix** - Investigate and fix the relay auto-selection loop
- [x] **Phase 2.1: Clear Announces Preserves Contacts** - Fix Clear All Announces to exempt My Contacts (#365) (INSERTED)
- [x] **Phase 2.2: Offline Map Tile Rendering** - Fix offline maps failing to render after extended offline period (#354) (INSERTED)

## Phase Details

Expand Down Expand Up @@ -63,6 +64,22 @@ Plans:
- [x] 02.1-01-PLAN.md — Fix DAO, Repository, ViewModel, and UI to preserve contact announces
- [x] 02.1-02-PLAN.md — Add DAO and ViewModel tests for contact-preserving deletion (depends on 02.1-01)

### Phase 2.2: Offline Map Tile Rendering (INSERTED)
**Goal**: Offline maps that were previously downloaded render correctly after extended offline periods, ensuring the offline code path explicitly uses local tile data without depending on network-fetched style resources
**Depends on**: Nothing (independent fix)
**Requirements**: OFFLINE-MAP-01
**Issue**: [#354](https://github.com/torlando-tech/columba/issues/354)
**Success Criteria** (what must be TRUE):
1. User can download offline map tiles, go fully offline for multiple days, and still see their downloaded tiles render correctly
2. The offline style loading path explicitly serves tiles from the local cache/MBTiles without relying on a network-fetched style URL
3. Zooming into a region covered by downloaded offline tiles shows full vector tile detail (roads, buildings, labels), not just continent-level outlines
4. The offline map region list correctly reflects available regions and their tiles are accessible
**Plans**: 2 plans in 2 waves

Plans:
- [x] 02.2-01-PLAN.md — Add localStylePath to DB schema and cache style JSON during download
- [x] 02.2-02-PLAN.md — Load local style JSON when offline and update MapScreen (depends on 02.2-01)

## Progress

**Execution Order:**
Expand All @@ -73,3 +90,4 @@ Phases 1 and 2 are independent and can be worked in any order.
| 1. Performance Fix | 3/3 | ✓ Complete | 2026-01-25 |
| 2. Relay Loop Fix | 0/3 | Not started | - |
| 2.1. Clear Announces Preserves Contacts (INSERTED) | 2/2 | ✓ Complete | 2026-01-27 |
| 2.2. Offline Map Tile Rendering (INSERTED) | 2/2 | ✓ Complete | 2026-01-27 |
63 changes: 52 additions & 11 deletions .planning/STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
See: .planning/PROJECT.md (updated 2026-01-24)

**Core value:** Fix the performance degradation and relay selection loop bugs so users have a stable, responsive app experience.
**Current focus:** Phase 2.1 - Clear Announces Preserves Contacts
**Current focus:** Phase 2.2 - Offline Map Tile Rendering

## Current Position

Phase: 2.1 (Clear Announces Preserves Contacts)
Phase: 2.2 (Offline Map Tile Rendering)
Plan: 2 of 2 complete
Status: Phase complete
Last activity: 2026-01-28 — Completed 02.1-02-PLAN.md (Test contact-preserving deletion)
Last activity: 2026-01-28 — Completed 02.2-02-PLAN.md (Load local style for offline rendering)

Progress: [███████████] 100% (8/8 total plans: 6 from phases 1-2 + 2/2 from phase 2.1)
Progress: [███████████] 100% (10/10 total plans: 6 from phases 1-2 + 2/2 from phase 2.1 + 2/2 from phase 2.2)

## Performance Metrics

**Velocity:**
- Total plans completed: 8
- Average duration: 5m 24s
- Total execution time: 43m 13s
- Total plans completed: 10
- Average duration: 7m 0s
- Total execution time: 69m 35s

**By Phase:**

Expand All @@ -30,10 +30,11 @@ Progress: [███████████] 100% (8/8 total plans: 6 from phas
| 01-performance-fix | 3/3 | 18m 42s | 6m 14s |
| 02-relay-loop-fix | 3/3 | 16m 19s | 5m 26s |
| 02.1-clear-announces | 2/2 | 8m 12s | 4m 6s |
| 02.2-offline-maps | 2/2 | 26m 22s | 13m 11s |

**Recent Trend:**
- Last 3 plans: 27m 11s (02-03), 2m 58s (02.1-01), 5m 14s (02.1-02)
- Trend: Fast execution for focused bug fixes and tests
- Last 3 plans: 5m 14s (02.1-02), 18m 22s (02.2-01), 8m (02.2-02)
- Trend: Database migrations slower, UI-only changes faster

*Updated after each plan completion*

Expand Down Expand Up @@ -61,12 +62,20 @@ Recent decisions affecting current work:
- Use SQL subquery (NOT IN) for contact-aware filtering instead of joins (02.1-01)
- Preserve original deleteAllAnnounces() for backward compatibility and testing (02.1-01)
- Fall back to deleteAllAnnounces() if no active identity (02.1-01)
- Launch style JSON fetch in separate coroutine (non-blocking) to avoid delaying UI updates (02.2-01)
- Use 5-second timeout on URL fetch to prevent infinite hangs in tests and slow networks (02.2-01)
- Use fromJson() instead of fromUri() for local style files to avoid HTTP cache dependency (02.2-02)
- Fall back to HTTP style URL if cached style file doesn't exist (backward compatibility) (02.2-02)

### Roadmap Evolution

- Phase 2.1 inserted after Phase 2: Clear Announces Preserves Contacts — #365 (URGENT)
- "Clear All Announces" deletes contact announces, breaking ability to open new conversations
- Fix: exempt My Contacts announces from the bulk delete
- Phase 2.2 inserted after Phase 2.1: Offline Map Tile Rendering — #354 (URGENT)
- Downloaded offline maps stop rendering after extended offline period (days)
- Likely cause: offline code path still uses network style URL, so MapLibre can't resolve layer definitions when fully offline
- Fix: ensure offline style loading explicitly uses local tile data without network dependency

### Pending Todos

Expand All @@ -92,9 +101,9 @@ Also pending from plans:
## Session Continuity

Last session: 2026-01-28
Stopped at: Completed 02.1-02-PLAN.md - Test contact-preserving deletion
Stopped at: Completed 02.2-02-PLAN.md - Load cached style for offline rendering
Resume file: None
Next: Phase 2.1 complete - all roadmap items finished
Next: All planned phases complete (Phase 1, 2, 2.1, 2.2)

## Phase 2 Completion Summary

Expand Down Expand Up @@ -140,3 +149,35 @@ All 2 plans executed successfully:
- Ready for merge and release
- Fixes critical UX bug preventing users from opening conversations with saved contacts
- No pending blockers for this phase

## Phase 2.2 Completion Summary

**Phase 02.2 - Offline Map Tile Rendering: COMPLETE**

All 2 plans executed successfully:
- 02.2-01: Cache style JSON during download (18m 22s) ✓
- 02.2-02: Load cached style for offline rendering (8m) ✓

**Key outcomes:**
- Issue #354 (offline maps lose rendering after days) resolved
- Style JSON cached during offline map download to local files
- MapLibre loads style from local JSON files when offline (not HTTP URL)
- Full vector tile detail (roads, buildings, labels) renders indefinitely offline
- Graceful fallback for regions without cached style (backward compatibility)
- On-device verification confirmed working behavior

**Technical implementation:**
- Database migration 34→35 adds `localStylePath` column to offline map regions
- Smart style resolution: check cache file → fall back to HTTP URL
- MapScreen uses `Style.Builder().fromJson()` for offline local styles (not `fromUri()`)
- Network disabled (allowNetwork = false) for offline modes
- Non-blocking style caching with 5-second timeout

**Testing confidence:** High - On-device testing confirmed, all unit tests pass

**Production readiness:**
- Ready for merge and release
- Resolves critical offline UX bug (maps unusable after days offline)
- Safe database migration (nullable column addition)
- No regressions in online map functionality
- No pending blockers for this phase
Loading