Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Cloud: mount the cloud drive as a workspace at /cloud

Đang mở
#793 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Lĩnh vực
cli, cloud, frontend

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ả

enhancement

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*WorkspaceLoader hooks.

Acceptance criteria

  • Cloud drive mounts at /cloud and 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.open read and write round-trip inside /cloud
  • Binary upload into /cloud works 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 --noEmit clean
  • Scoped mutation coverage >= 80%

Implementation notes

  • useWorkspaceManager.ts already 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:26 currently 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.
  • TreeNode in fileSystemTypes.ts already carries 11 per-workspace-type booleans. Adding
    isCloudWorkspace worsens a known smell; #753 proposes collapsing them into a single
    discriminated field and is a useful precursor to this issue.
  • CompositeFileSystem rejects mounts that are not at root level and rejects writes to /
    itself, so /cloud must be a single top-level segment.
  • Cloud workspaces persist to localStorage as metadata only (like PersistedWorkspace); the
    contents come from Firestore on next sign-in.

Depends on

  • #792

Related

  • #753 - collapse TreeNode read-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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của jcollard/LuaInTheWeb

Tất cả issue của jcollard/LuaInTheWeb

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.