Polish Calendar token-clear confirmation, 44px touch targets, ReviewTab URL state, and SyncTab retry (4 light items)

オープン
#18,164 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, react

調査の方向性

Start in client/src/components/calendar/SyncTab.jsx and ConfigTab.jsx where the Clear handlers run on a single click, and copy the existing useConfirmDelete and InlineConfirmRow pattern from ConfigTab account removal. ReviewTab.jsx (useState at line 16) and apiCalendar.js getCalendarTokenStatus are the other entry points. Run the four matching test files after changes. Done means: clears require inline confirmation, touch targets meet 44px on coarse pointers, the review date lives in a validated URL param, and token-status failures show ListLoadError with a working Retry. This issue is blocked by #18157, so confirm that work has landed first.

索引モデルが issue の本文から書いたものです。

説明

area:calendar area:ui design-usability effort:low in-progress model:light plan planner:gemini-4-neon-high priority:2 ux

Blocked by #18157

Batched model:light + effort:low findings from the design-usability audit of Calendar (2026-11-24). Ship all 4 items in one PR.

1. Require inline confirmation before clearing shared Calendar/Messages tokens and Google API auth (sev 6/10)
  • Problem: SyncTab.jsx:73-81,190-199 executes clearCalendarToken(provider) immediately on a single click even though line 154 warns the tokens are shared with the Messages module, and ConfigTab.jsx:91-99,422-428 executes clearGoogleAuth() immediately on a single click of a compact Clear button despite ConfigTab already using useConfirmDelete + InlineConfirmRow for account removal (lines 40, 361-371).
  • Impact: A single accidental click or tap silently revokes live browser-session credentials shared across both Calendar and Messages, or wipes Google API OAuth setup and forces full re-authorization with no undo.
  • Decided Fix: Gate both credential-clear buttons with useConfirmDelete and ConfirmButtonPair (or InlineConfirmRow in ConfigTab, which already imports both on lines 19 and 23) so clearing a shared browser token or Google API OAuth credentials requires an explicit inline confirm step. Update the existing single-click clear tests in SyncTab.test.jsx and ConfigTab.test.jsx to confirm before asserting the API call.
  • Files: client/src/components/calendar/SyncTab.jsx, client/src/components/calendar/ConfigTab.jsx, client/src/components/calendar/SyncTab.test.jsx, client/src/components/calendar/ConfigTab.test.jsx
  • Clicking Clear on a provider token in SyncTab opens an inline confirmation (via useConfirmDelete + ConfirmButtonPair or InlineConfirmRow) naming the provider and noting it is shared with Messages; clearCalendarToken is not called until confirmed.
  • Clicking Clear on an authenticated Google API connection in ConfigTab opens an inline confirmation before calling clearGoogleAuth.
  • Canceling either inline confirmation preserves the token/auth state without firing an API call.
  • Updated SyncTab.test.jsx and ConfigTab.test.jsx verify inline confirmation, duplicate-click blocking while in flight, and retry after failure.
2. Bring Calendar Config, Sync, Review, and Agenda action buttons up to 44px touch targets and button affordance (sev 5/10)
  • Problem: ConfigTab.jsx:346-357 (account delete, p-1 around 16px icon = 24x24px) and ConfigTab.jsx:605-616 (sub-calendar eye toggle, p-0.5 around 14px icon = 18x18px) fall far below PortOS's 44px touch-target contract and bypassed hitAreas.test.js because their bodies use ternary icons. Compact row buttons in ConfigTab.jsx:336,422,539,547,596,617, SyncTab.jsx:183,191, and ReviewTab.jsx:145,363,370 are ~20–24px tall with no pointer-coarse:min-h-11 floor, and AgendaTab.jsx:202 renders Retry as a bare underlined text button.
  • Impact: Touch users face 18x18px–24x24px tap targets directly adjacent to destructive controls (Delete, Clear, Dormant), increasing mis-tap errors, while AgendaTab's error Retry renders as a tiny unstyled text link violating PortOS's button-affordance and 44px touch-target conventions.
  • Decided Fix: Add pointer-coarse:min-h-11 pointer-coarse:min-w-11 inline-flex items-center justify-center to ConfigTab.jsx:346 and ConfigTab.jsx:605, add pointer-coarse:min-h-11 inline-flex items-center to the compact py-0.5/py-1 row buttons in ConfigTab.jsx, SyncTab.jsx, and ReviewTab.jsx, and replace AgendaTab.jsx:202's bare className="underline" Retry button with button styling matching CalendarWindowStatus.jsx:9 (min-h-[44px] rounded border border-port-border px-3 py-2 text-port-accent hover:bg-port-border).
  • Files: client/src/components/calendar/ConfigTab.jsx, client/src/components/calendar/SyncTab.jsx, client/src/components/calendar/ReviewTab.jsx, client/src/components/calendar/AgendaTab.jsx
  • ConfigTab account delete (line 346) and sub-calendar visibility toggle (line 605) carry pointer-coarse:min-h-11 pointer-coarse:min-w-11 inline-flex items-center justify-center (or unconditional min-h-[44px] min-w-[44px]).
  • Compact row action buttons in ConfigTab (Enabled/Disabled, Clear, Enable All, Refresh/Discover, Activate, Dormant), SyncTab (Test, Clear), and ReviewTab (Today, Confirm, Cancel) carry pointer-coarse:min-h-11 so coarse pointers meet the 44px touch-target floor without inflating dense desktop rows.
  • AgendaTab Retry button (line 202) renders with button affordance (padding, border/hover surface, and min-h-[44px]) matching CalendarWindowStatus.jsx:9.
3. Persist Calendar ReviewTab date in URL params and guard cleared/invalid date input (sev 5/10)
  • Problem: Unlike AgendaTab (?from=), DayView (?date=), WeekView (?week=), and MonthView (?month=), ReviewTab.jsx:16 keeps date in local useState(localDateStr()) and writes e.target.value directly on line 137 without validation; clearing the native date picker sets date to '', requesting /calendar/review/ and turning subsequent Previous/Next clicks (line 54) into Invalid Date / NaN-NaN-NaN.
  • Impact: Refreshing, sharing a link, or switching tabs and pressing Back silently resets Daily Review to today, losing the user's review context; clearing the native date picker breaks the view with a failed request to /calendar/review/ and causes Previous/Next to navigate to NaN-NaN-NaN.
  • Decided Fix: Replace useState(localDateStr()) at ReviewTab.jsx:16 with useUrlParams() reading a validated YYYY-MM-DD param (e.g. reviewDate via calendarDateFromParam in calendarUtils.js:104), falling back to today when empty or invalid. Update onChange, changeDate, and Today to write via updateParams, and add tests in ReviewTab.test.jsx for URL persistence and cleared-input recovery.
  • Files: client/src/components/calendar/ReviewTab.jsx, client/src/components/calendar/ReviewTab.test.jsx
  • ReviewTab reads and updates its selected date via useUrlParams() (e.g. ?reviewDate=YYYY-MM-DD) validated with calendarDateFromParam, preserving the selected date across refreshes, copied URLs, and browser Back/Forward.
  • Clearing the native date input or supplying an invalid query date cleanly falls back to today's local date without firing a malformed /calendar/review/ request or producing NaN-NaN-NaN on Previous/Next.
  • ReviewTab.test.jsx verifies URL date persistence, Back/refresh restoration, and safe fallback when the date input is cleared.
4. Add Retry recovery and avoid duplicate error reporting when Calendar SyncTab token status fails to load (sev 4/10)
  • Problem: apiCalendar.js:18 defines getCalendarTokenStatus without an options parameter, so SyncTab.jsx:24 cannot pass { silent: true }. On failure, request() toasts an error while SyncTab.jsx:158-159 renders a static "Could not load token status" paragraph with no Retry recovery button.
  • Impact: A transient token-status fetch failure fires a global error toast on top of an inline dead-end message with no Retry control, forcing the user to reload the entire page to inspect or manage Calendar/Messages tokens.
  • Decided Fix: Add an optional options = {} parameter to getCalendarTokenStatus in client/src/services/apiCalendar.js:18. In SyncTab.jsx:23-27 and 156-160, call getCalendarTokenStatus({ silent: true }), store tokenError on rejection, and render matching ConfigTab.jsx:407-408. Add a regression test in SyncTab.test.jsx.
  • Files: client/src/components/calendar/SyncTab.jsx, client/src/services/apiCalendar.js, client/src/components/calendar/SyncTab.test.jsx
  • getCalendarTokenStatus(options = {}) in apiCalendar.js forwards options to request().
  • SyncTab calls getCalendarTokenStatus({ silent: true }), tracks token load errors separately, and renders ListLoadError with a working Retry button when the read fails instead of a dead-end paragraph and duplicate error toast.
  • SyncTab.test.jsx verifies failed token-status load displays ListLoadError with Retry and recovers when Retry succeeds.
主要言語
JavaScript
スター
38
フォーク
32
平均マージ
20分
マージ済み PR(30日)
996

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

atomantic/PortOS のほかの issue

atomantic/PortOS の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。