feat(drive): Google Drive folder sync — frontend (Phase 10)#97
Conversation
Settings → Integrations tab (new) with a DriveSettings panel: connect / disconnect Google, list linked folders with direction + accepted types + sync status, "Sync now" / pause / unlink, and an add-link flow (pick a Mnema folder, pick or create a Drive folder, choose direction + file types). Talks to /api/drive/*. Also fleshes out the connections/drive.astro stub (was "coming soon · Phase 10") into a real landing that links to the new Integrations settings, and adds the Integrations item to the settings nav. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Jason-jo17 <jason@theboringpeople.in>
nbkdoesntknowcoding
left a comment
There was a problem hiding this comment.
Nice work — the panel is XSS-clean (all Drive-supplied strings render as escaped React children), it matches our inline-style/token conventions, and it handles the not-configured / not-connected / loading / empty / error states properly. Since it depends on #96, we'll merge that first.
A few accessibility items to address before merge (these are the kind of thing our a11y pass would flag):
The "Add link" modal needs proper dialog semantics. AddLinkModal (around DriveSettings.tsx:230) is a bare position: fixed overlay — please add role="dialog" + aria-modal="true", trap focus inside it, and close on Escape (right now it only closes via backdrop-click / Cancel).
The file-type chips need a pressed state. They're toggle s (around DriveSettings.tsx:281) but expose no aria-pressed, so a screen reader can't tell which types are selected. Add aria-pressed={selected}.
Replace the native confirm() for unlink (:98) with the app's own confirm pattern for consistency (minor).
One tiny token nit: there's a hardcoded #f87171 for destructive text — fine to leave, but a --danger/error token would be more consistent if we have one.
Everything else looks good — once the dialog + aria-pressed items are in, this is ready.
Addresses review on nbkdoesntknowcoding#97: - AddLinkModal is a proper dialog now: role="dialog" + aria-modal="true" + aria-labelledby, focus moves into it on open, Tab is trapped within it, Escape closes it, and focus returns to the trigger on close. - File-type chips expose aria-pressed so a screen reader announces which types are selected. - Replace the native confirm() for unlink with the app's inline confirm/cancel pattern. - Use the var(--status-error) token for destructive text instead of a hardcoded #f87171. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Jason-jo17 <jason@theboringpeople.in>
|
Done in 5a6938c.
Depends on #96 as you noted — that one's ready to merge first. |
54d1974
into
nbkdoesntknowcoding:main
What & why
Google Drive integration — part 2 of 3 (frontend). New Settings → Integrations tab with a
DriveSettingspanel: connect/disconnect Google, list linked folders (direction + accepted types + status), Sync-now / pause / unlink, and an add-link flow (pick a Mnema folder, pick or create a Drive folder, choose direction + file types). Also fleshes out theconnections/drive.astrostub into a real landing and adds the Integrations nav item.Linked issue
No single issue — see below.
Test evidence
ESLint clean on
DriveSettings.tsx;astro checkreports no new type errors (only the repo’s pre-existingSettingsLayout.astrounused-var warnings). UI calls/api/drive/*.Checklist
git commit -s).