Conversation
Second of eight. These have no local dependencies, so they can land before anything that consumes them. types/home.ts is the WebSocket contract shared with the backend: the Schedule entity plus the list, upsert, voice and session message shapes. The filename is wrong — this is transport, not a home screen — but renaming it belongs in a refactor, not in the commit that first tracks it. mocks/schedules.ts is the fixture set the screens render against until the backend is wired, including the overlap detection that the upsert flow reports back. theme.ts grows from two tokens into the full palette, spacing scale and radii the new screens use. colors.text is kept on top of that palette purely so the HomeScreen still on main keeps compiling; the wiring commit at the end of this series removes it along with that screen.
| time_remind_offset_minutes: number; | ||
| time_triggered_at: string | null; | ||
| geo_triggered_at: string | null; | ||
| system_schedule_ref_id: string | null; |
There was a problem hiding this comment.
P1 — Keep the list contract aligned with the server. ScheduleSummary and handle_list() always include system_alarm_ref_id, but the frontend Schedule type omits it. Consumers typed against this contract cannot access the alarm reference, and the mocks also stop exercising that field. Add system_alarm_ref_id: string | null here and to the fixtures.
| schedule_id: scheduleId, | ||
| schedule_type: command.payload.schedule_type, | ||
| conflicts: findScheduleConflicts(command, schedules, scheduleId), | ||
| geofence_armed: command.payload.geofence_armed ?? existingSchedule?.geofence_armed ?? true, |
There was a problem hiding this comment.
P1 — Mirror the backend's geofence default. When geofence_armed is omitted, ScheduleService sets it to latitude !== null && longitude !== null; it does not preserve the existing value or default to true. A new time-only command therefore returns false from the server but true from this mock, and edits that remove coordinates can also diverge. Derive the fallback from the command coordinates to keep screen behavior representative.
| @@ -0,0 +1 @@ | |||
| /// <reference types="@baidumap/jsapi-v4-types" /> | |||
There was a problem hiding this comment.
P1 — Install the referenced type package. @baidumap/jsapi-v4-types is absent from both package.json and the lockfile, and TypeScript reports this directive as unresolved under --traceResolution. The normal check currently passes only because no BMapGL symbols are used yet, so this file provides no declarations when the map code lands. Add the package as a dev dependency (and update the lockfile), or replace this with an actual local declaration.
Summary
frontend/src/typestheme.ts(keepcolors.textfor main compatibility)Validation
npm cinpm run checknpx expo export --platform android --output-dir dist