Skip to content

checkpoint; file browser working#4

Open
pablo-mayrgundter wants to merge 16 commits intorpstohr-prim:feature/google-drive-integrationfrom
pablo-mayrgundter:feature/google-drive-integration
Open

checkpoint; file browser working#4
pablo-mayrgundter wants to merge 16 commits intorpstohr-prim:feature/google-drive-integrationfrom
pablo-mayrgundter:feature/google-drive-integration

Conversation

@pablo-mayrgundter
Copy link
Copy Markdown

No description provided.

pablo-mayrgundter and others added 16 commits March 6, 2026 16:45
certs: remove localhost certs and just gen locally when needed
Add instructions for generating local pem files using mkcert.

Signed-off-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>
Signed-off-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>
UI changes:
- URL paste section removed; Browse button moved below recent files, right-aligned
- Account title uses subtitle1/bold, left-aligned
- Dates older than 5 days display as locale date with year

Lint fixes (pre-existing):
- Extract magic numbers to named constants in GoogleDriveProvider/PickerDialog
- Replace console.log with debug() in GoogleDriveProvider
- Add JSDoc to registry, loadGisScript, generateId
- Remove async from checkStatus and pickLocation (no await needed)
- Fix empty revoke callback and stale eslint-disable directives

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- OPFS.worker.js: fetchLatestCommitHash now returns {hash, date}; the
  commit date is stored as LastModifiedGithub header in the HTTP cache
  and included in all completed postMessage events
- utils.js: downloadModel accepts an onLastModifiedGithub callback that
  fires whenever any completed message carries the date (handles both
  immediate 'exists' and deferred 'renamed' events after Promise resolves)
- Loader.js: passes callback to downloadModel; constructs sharePath via
  navigateBaseOnModelPath and calls updateRecentFileLastModified
- persistence.ts: adds updateRecentFileLastModified and
  updateRecentFileModelTitle helpers
- Share.jsx: mounts useGithubLastModified hook as a non-OPFS fallback
- connections/useGithubLastModified.js: new hook; fixes missing leading
  slash bug (filepath from routes layer has no leading slash — must
  prepend '/' before passing to navigateBaseOnModelPath)
- Tests: OPFS.worker.test.js (fetchLatestCommitHash), utils.test.js
  (onLastModifiedGithub callback cases), Loader.github.test.js
  (end-to-end sharePath + updateRecentFileLastModified),
  persistence.test.ts (updateRecentFileLastModified contract)
- Fix pre-existing test failures: GitHubFileBrowser.test (add theme
  wrapper), OpenModelControl.test (update for new tab/UI structure)
- Docs: DESIGN.md and PLAYBOOK.md updated with OPFS architecture,
  recent-files pipeline, filepath format contract, and testing patterns

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>
…fixes

- AccountFooter.jsx: new component for connected account display with
  settings menu (used in GitHub and Google Drive tabs)
- Selector.jsx + Selector.test.jsx: recent-files section and browse
  button support; updated with account footer
- OpenModelDialog.jsx: restructured tabs (Local / Sources / GitHub /
  Samples); GitHub tab shows recents + browse flow; Google Drive via SourcesTab
- GitHubFileBrowser.jsx: redesigned layout and selectors
- SelectorSeparator.jsx, ConnectProviderButton.jsx, SourcesTab.jsx,
  ConnectionCard.jsx, RecentFilesBrowseSection.jsx: UI refinements
- GoogleDriveConnect.spec.ts: replace window as any with typed Window
  interface declaration
- GoogleDriveBrowser.ts, GoogleDriveProvider.ts, loadGisScript.ts: fix
  lint warnings (unused param, JSDoc format)
- theme/Colors.js, Components.js, Palette.js: accent color and
  component overrides for new UI
- package.json: add --max-warnings 0 to precommit so ESLint warnings
  block commits (lint script unchanged for dev use); version bump
- STYLE.md: style guide doc
- AGENTS.md: trimmed (content moved to CLAUDE.md)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- GoogleDriveConnect.spec.ts: click 'Google' tab (LABEL_SOURCES), not 'Sources'
- OpenModelDialog-local-tab.png: regenerate baseline after Google tab added

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- GoogleDriveConnect.spec.ts: use [data-testid^="button-browse-drive-"]
  instead of getByText('Open File') which was never the button label
- OpenModelDialog.jsx: handlePickerCancel now calls setIsDialogDisplayed(true)
  so the dialog reopens when the user cancels the Google Drive picker

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Off by default pending Google OAuth app approval. Enabled via URL:
  ?feature=googleDrive

- OpenModelDialog: use useExistInFeature('googleDrive') to conditionally
  include LABEL_SOURCES in tabLabels; switch tab content rendering from
  hardcoded indices to tabLabels[currentTab] === LABEL_X comparisons so
  indices remain correct whether or not the Google tab is present
- OpenModelDialog.test.jsx: GitHub tab is now index 1 (not 2) when
  Google tab is absent
- GoogleDriveConnect.spec.ts: re-navigate with ?feature=googleDrive so
  the Google tab is visible during e2e tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eholder

Google Drive URL fix:
- OpenModelDialog navigates to /v/g/<fileId> instead of /v/new/<uuid>,
  preserving source info rather than losing it to the OPFS hash
- CadView detects GoogleResult and downloads via OAuth using getBrowser
- GoogleDriveProvider persists OAuth token to sessionStorage so it survives
  the full-page reload triggered by navigateToModel (avoids popup-blocked error)

Selector empty state:
- Selector and SelectorSeparator accept emptyText prop (default '<None>'):
  shows a non-selectable placeholder at full opacity when the list is empty
- GitHubFileBrowser passes emptyText='<No subfolders>' to the Folder selector

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When /v/g/<fileId> is loaded without a connected Google Drive account
(e.g. fresh page load, public file, or route tests), fall back to the
API key downloadUrl instead of throwing. OAuth path is still used when
a connection exists in the store.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant