checkpoint; file browser working#4
Open
pablo-mayrgundter wants to merge 16 commits intorpstohr-prim:feature/google-drive-integrationfrom
Open
checkpoint; file browser working#4pablo-mayrgundter wants to merge 16 commits intorpstohr-prim:feature/google-drive-integrationfrom
pablo-mayrgundter wants to merge 16 commits intorpstohr-prim:feature/google-drive-integrationfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.