fix(schedule): focus created schedules and dock voice input - #248
fix(schedule): focus created schedules and dock voice input#248znnnnnnn-wil wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
f33fb0b to
3574028
Compare
There was a problem hiding this comment.
Reviewed the calendar-focus flow from assistant command results through local occurrence expansion, plus the docked voice-control layout. The new layout avoids covering the final schedule row, but the command filtering and reply lifecycle still introduce user-visible regressions; the recurring lookup also needs the same failure containment as the normal calendar loads. Local targeted Jest execution was unavailable because this checkout has no installed frontend/node_modules; the fixed diff passes git diff --check.
| command: AppliedCommand | null, | ||
| ): CalendarFocusTarget | null { | ||
| if (command === null || command.status !== 'applied') return null; | ||
| const raw = command.schedule ?? command.schedules?.find((item) => typeof item.id === 'string'); |
There was a problem hiding this comment.
[P1] Restrict calendar focus to created schedules
voice.command.result populates schedules for list_schedules, and HomeScreen calls this helper for every applied command. Falling back to the first item in command.schedules therefore makes a read-only request such as “list my schedules” jump the calendar to an arbitrary first result; time-schedule update/delete results are also focused even though the PR contract is specifically voice-created schedules. Gate this on the intended create operation and singular command.schedule instead of treating every applied result as a focus target.
There was a problem hiding this comment.
????calendarFocusTargetFromCommand() ????? operation === create_schedule?status === applied,????? singular command.schedule;list_schedules ? plural schedules?update ? delete ?????? null,??????????? calendarFocus.test.ts ?? list/update/delete ? plural read ???
| <View style={styles.container}> | ||
| <View pointerEvents="box-none" style={styles.overlay}> | ||
| {ptt.replyText ? ( | ||
| <Pressable onPress={() => {}} style={styles.bubble}> |
There was a problem hiding this comment.
[P2] Keep a working way to dismiss the reply bubble
Removing the full-screen dismiss target fixes calendar hit-testing, but the replacement bubble press handler is a no-op. replyText is otherwise cleared only by dismissReply() or when another recording starts, so after a completed push-to-talk reply the bubble permanently consumes vertical space until the user begins a new turn. Wire the bubble (or a dedicated close affordance) to ptt.dismissReply so the existing reply lifecycle remains usable without blocking the calendar.
There was a problem hiding this comment.
???????????????? ptt.dismissReply();???? dismiss layer ????,?????????????????? overlay ??????????????????????
| void findNextOccurrenceDate(service, accountId, timezone, focusTarget.scheduleId).then( | ||
| (date) => { |
There was a problem hiding this comment.
[P2] Contain recurring focus lookup failures
Unlike the normal month and location loads below, this newly launched promise has no rejection handler. If getSchedulesByRange rejects while resolving a recurring command (for example a transient SQLite/read failure), the effect produces an unhandled promise rejection instead of leaving the current selection intact and using the calendar's existing error path. Add a catch or handle the lookup in an async block with failure containment before applying the date.
There was a problem hiding this comment.
?????? focus ?????? .then(...).catch(...),??????????????? selectedDate/visibleMonth ??,???? unhandled rejection ???;?????????
3574028 to
1d65685
Compare
Part of #176
Summary
Fixes in This Update
operation === create_schedule,status === applied, and the singularcommand.schedule; list, update, delete, and plural read results never focus the calendar.ptt.dismissReply()action without restoring a full-screen transparent press layer.getSchedulesByRange, including multi-year intervals.Visual Evidence
Mobile target: 390 x 844.
The bottom input bar is a normal flex sibling below
ScheduleCalendarScreen, so the scrollable schedule area ends above the bar instead of being covered by it. The deployed preview is available at Vercel preview. A local runtime screenshot was not attached because this environment has no browser screenshot runner; no screenshot files are committed.Verification
npm.cmd run lintpassed.npm.cmd run typecheckpassed.npm.cmd run test:vitestpassed: 47 tests.npm.cmd run test:jest -- --forceExitpassed: 295 tests.npx.cmd expo export --platform androidpassed.git diff --checkpassed.GitHub CI for commit
1d65685is pending after this update.Scope
This PR does not modify schedule business rules, schedule models, SQLite schema or migrations, sync, HTTP/WebSocket contracts, Agent interface names or payloads, ASR/LLM/TTS behavior, reminder semantics, Schedule Detail Sheet, unrelated screens, or the global theme.