Cloud: mount the cloud drive as a workspace at /cloud
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- firebase, typescript
Hướng nghiên cứu
Start with packages/shell-core/src/CompositeFileSystem.ts and the workspace types, then compare the existing use*WorkspaceLoader hooks before tracing workspaceManagerHelpers.ts and useWorkspaceManager.ts. Review the listed component and adapter files, then run the TypeScript check and exercise the acceptance criteria. Done means /cloud mounts and persists correctly, cloud file operations work across the explorer, shell, and Lua runtime, and the virtual and cloud icons are distinct.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Mount the cloud drive as a first-class workspace at /cloud, alongside the existing virtual,
local, and read-only workspaces. This is what makes cloud storage "just work" with the file
explorer, editor tabs, shell, and Lua runtime — no component outside the workspace layer should
need to know the drive is remote.
The architecture already supports this: CompositeFileSystem
(packages/shell-core/src/CompositeFileSystem.ts) mounts N filesystems at distinct root paths and
routes every operation, and six of the eight existing workspace types are already network-fetched.
Scope
| Change | File |
|---|---|
Add 'cloud' to WorkspaceType; add addCloudWorkspace to UseWorkspaceManagerReturn |
src/hooks/workspaceTypes.ts |
Add 'cloud' to WorkspaceTypeSelection |
src/components/AddWorkspaceDialog/types.ts |
Third creation callback alongside onAddVirtualWorkspace / onAddLocalWorkspace |
src/components/FileExplorer/types.ts |
DEFAULT_CLOUD_MOUNT_PATH = '/cloud', createCloudWorkspace, restore branch |
src/hooks/workspaceManagerHelpers.ts |
| Init / mount / persist branches | src/hooks/useWorkspaceManager.ts |
Workspace-type mapping in buildTreeFromFileSystem |
src/hooks/compositeFileSystemAdapter.ts |
| Tree node flag | src/hooks/fileSystemTypes.ts |
| Distinct cloud icon | src/components/FileTreeItem/FileTreeItem.tsx |
- Auto-mount on sign-in; unmount cleanly on sign-out without disturbing other workspaces or the
shell's current working directory. - New
src/hooks/useCloudWorkspaceLoader.ts, a sibling of the six existing
use*WorkspaceLoaderhooks.
Acceptance criteria
- Cloud drive mounts at
/cloudand appears in the file explorer - Auto-mounts on sign-in, unmounts on sign-out, other workspaces unaffected
- Create / read / edit / rename / delete files and folders work from the explorer
- The shell can
cd /cloud, list, and run a Lua script from it -
require()resolves a module inside/cloud -
io.openread and write round-trip inside/cloud - Binary upload into
/cloudworks and lands in Cloud Storage - The virtual workspace's current cloud icon is replaced so the two are distinguishable
- Loading state visible while hydration streams
-
npx tsc -p lua-learning-website/tsconfig.app.json --noEmitclean - Scoped mutation coverage >= 80%
Implementation notes
useWorkspaceManager.tsalready exceeds the 400-line lint cap and carries
/* eslint-disable max-lines */. Put cloud branches in helper modules; do not grow that file.FileTreeItem.tsx:26currently uses a cloud glyph for the virtual (IndexedDB) workspace
(// Virtual workspace icon - cloud (browser storage)). Leaving it would make the real cloud
drive indistinguishable from browser-local storage — actively misleading given this milestone.TreeNodeinfileSystemTypes.tsalready carries 11 per-workspace-type booleans. Adding
isCloudWorkspaceworsens a known smell; #753 proposes collapsing them into a single
discriminated field and is a useful precursor to this issue.CompositeFileSystemrejects mounts that are not at root level and rejects writes to/
itself, so/cloudmust be a single top-level segment.- Cloud workspaces persist to
localStorageas metadata only (likePersistedWorkspace); the
contents come from Firestore on next sign-in.
Depends on
- #792
Related
- #753 - collapse
TreeNoderead-only/workspace booleans into one flag
Branching
This issue is part of the Cloud Accounts & Storage
milestone, which uses feat/cloud as its integration branch.
Branch from feat/cloud, and open the PR against feat/cloud. Never against main.
Create the branch (the --base flag also sets the default PR target for this branch):
gh issue develop <number> --base feat/cloud --checkout
Open the PR:
python3 scripts/issue-review.py <number> --base feat/cloud \
--summary "<summary>" --test-plan "<test-plan>"
feat/cloud merges to main in a single PR once the milestone is complete.
Why both flags are required: gh issue develop without --base branches from the repository
default branch (main), and scripts/issue-review.py falls back to main when --base is
omitted — both for the gh pr create target and for the changed-file list in the PR body.
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jcollard/LuaInTheWeb
-
tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
jcollard/LuaInTheWeb#752 ·
-
tech-debt
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
jcollard/LuaInTheWeb#690 ·
-
tech-debt
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
jcollard/LuaInTheWeb#590 ·
-
tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
jcollard/LuaInTheWeb#518 ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
jcollard/LuaInTheWeb#235 ·
Tất cả issue của jcollard/LuaInTheWeb
Issue tương tự
-
area:desktop area:ui bug platform:macos
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
anthropics/claude-code#106183 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
feature:App-Tour feature:Chat ready Web
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
digitalfabrik/integreat-app#4523 · 2 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Required Lexical field accepts two empty paragraphsCó thể đã có người làm @lazerg đã nhận hôm nay. Đang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
payloadcms/payload#19222 ·
Maintainer thường phản hồi trong vòng 1 ngày