Fieldforce Mobile Implementation
Overview
The Mobile Web app is meticulously designed for field teams operating on-site. It combines Astro for static shell rendering with Qwik islands for interactivity, delivering an extremely fast, touch-first mobile experience.Architecture
- Framework Structure: Astro pages (
.astro) render the initial shell with minimal JS, while Qwik components (.tsx) hydrate lazily strictly upon interaction. - Pagination Strategy: Exclusively implements cursor-based infinite scroll (
useInfiniteTasks) mapped to the Go backend, yielding a seamless vertical timeline. - Storage Abstraction: Defines a
FieldforceStorageAdapterInterface to sandbox interactions with storage. This deliberate decision means components never interface directly withindexedDB, facilitating a future migration to Electric SQL.
Core Features
- My Tasks List: A prioritized list of assigned tasks utilizing touch-friendly cards, sorting (by due date/priority), and an immediate overdue visual badge.
- Interactive Islands:
TaskTimeline: Displays activities and audit logs merged into vertically stacked cards.TaskStatusToggle: Offers rapid status transitions securely backed by confirmation dialogues.
- Log Activity Bottom Sheet:
Offline-First Preparation
Mobile connectivity is notoriously unstable for field teams. The app strictly enforces an architecture built for offline readiness. The Phase 2 IndexedDB rollout and Phase 4 Electric SQL upgrade will implement the pre-establishedFieldforceStorageAdapter, making offline synchronization completely transparent to the UI.