feat: drive feature#7
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new “Drive” feature spanning backend APIs/models and frontend UI, enabling per-project folders/files with Markdown editing and version history, plus search integration.
Changes:
- Implement Drive backend: DriveItem/DriveItemVersion models, policies, controllers, routes, migrations, and OpenAPI docs.
- Implement Drive frontend: Pinia store, Drive workspace UI, Markdown editor, routing, and dashboard entry point.
- Add automated coverage: Rails request/model/openapi specs, Vitest unit tests, and Playwright E2E flow.
Reviewed changes
Copilot reviewed 53 out of 53 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/views/MarkdownDriveEditorView.vue | Drive markdown editor route view |
| frontend/src/views/DashboardView.vue | Adds Drive tile/link on dashboard |
| frontend/src/views/BoardWorkspaceView.vue | Hosts Drive workspace/editor inside workspace shell |
| frontend/src/stores/drive.ts | Pinia store for drive items/versions/content |
| frontend/src/stores/tests/drive.spec.ts | Unit tests for drive store |
| frontend/src/services/api/types.ts | Adds Drive types + search type update |
| frontend/src/services/api/drive.ts | Drive API client endpoints |
| frontend/src/services/api/client.ts | Adds blob request helper + FormData header handling |
| frontend/src/services/api.ts | Exposes driveApi via root api object |
| frontend/src/router/index.ts | Adds /drive and /drive/items/:id/edit routes |
| frontend/src/i18n/locales/zh-CN.json | Adds Drive-related strings |
| frontend/src/i18n/locales/en.json | Adds Drive-related strings |
| frontend/src/components/search/ResourceSearch.vue | Labels drive_item search results |
| frontend/src/components/kanban/ProjectSidebar.vue | Renames view types/aria label for kanban views |
| frontend/src/components/drive/MarkdownEditorPanel.vue | Editor panel with preview + version restore UI |
| frontend/src/components/drive/DriveWorkspace.vue | Main Drive workspace (list/details/actions) |
| frontend/src/components/drive/DriveToolbar.vue | Upload/refresh toolbar |
| frontend/src/components/drive/DriveSidebar.vue | Drive-specific sidebar with project picker |
| frontend/src/components/drive/DriveItemList.vue | File/folder list + context menu |
| frontend/src/components/drive/DriveDetailsPanel.vue | Selected item details + version list |
| frontend/src/components/drive/DriveBreadcrumb.vue | Breadcrumb navigation for folders |
| frontend/src/components/drive/DriveActionDialog.vue | Create/rename/move/delete dialog |
| frontend/src/components/drive/tests/MarkdownEditorPanel.spec.ts | Unit tests for markdown editor panel |
| frontend/src/App.vue | Clears drive store on logout; routes drive search results |
| frontend/e2e/drive.spec.ts | Playwright E2E coverage for Drive flows |
| backend/spec/requests/api/v1/search_spec.rb | Adds search coverage for drive items |
| backend/spec/requests/api/v1/openapi/drive_items_spec.rb | Rswag OpenAPI request specs for Drive |
| backend/spec/requests/api/v1/drive_items_spec.rb | Request specs for Drive endpoints |
| backend/spec/rails_helper.rb | Clears Drive tables between specs |
| backend/spec/openapi_helper.rb | Adds Drive schemas for OpenAPI generation |
| backend/spec/models/drive_item_spec.rb | Model specs for DriveItem behavior |
| backend/spec/factories/drive_items.rb | Factory for drive items/files/markdown |
| backend/openapi/v1/openapi.yaml | Generated OpenAPI spec updated with Drive endpoints |
| backend/db/schema.rb | Schema updates for ActiveStorage + Drive tables/extensions |
| backend/db/migrate/20260709103000_create_drive_item_versions.rb | Migration: drive_item_versions table |
| backend/db/migrate/20260709102000_add_soft_delete_to_drive_items.rb | Migration: soft delete + partial unique indexes |
| backend/db/migrate/20260709101000_create_drive_items.rb | Migration: drive_items table + indexes |
| backend/db/migrate/20260709100000_create_active_storage_tables.rb | Migration: ActiveStorage tables (guarded) |
| backend/config/routes.rb | Routes for drive_items + drive_item_versions |
| backend/app/views/api/v1/drive_items/versions.json.jbuilder | Versions list JSON view |
| backend/app/views/api/v1/drive_items/show.json.jbuilder | Drive item JSON view |
| backend/app/views/api/v1/drive_items/index.json.jbuilder | Drive items list JSON view |
| backend/app/views/api/v1/drive_items/_drive_item.json.jbuilder | Drive item JSON partial |
| backend/app/views/api/v1/drive_item_versions/_drive_item_version.json.jbuilder | Drive item version JSON partial |
| backend/app/policies/drive_item_version_policy.rb | Authorization for drive item versions |
| backend/app/policies/drive_item_policy.rb | Authorization for drive items/actions |
| backend/app/models/search_document.rb | Registers drive_item as searchable resource |
| backend/app/models/project.rb | Adds association to drive_items |
| backend/app/models/drive_item.rb | Drive item model w/ attachments, versions, soft delete, search |
| backend/app/models/drive_item_version.rb | Version model w/ attachment + helpers |
| backend/app/models/concerns/soft_deletable.rb | New reusable soft delete concern |
| backend/app/controllers/api/v1/drive_items_controller.rb | Drive items CRUD/content/file/version endpoints |
| backend/app/controllers/api/v1/drive_item_versions_controller.rb | Version content/download/restore endpoints |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
14
to
17
| # These are extensions that must be enabled in order to support this database | ||
| enable_extension "pg_catalog.plpgsql" | ||
| enable_extension "pg_stat_statements" | ||
| enable_extension "pg_trgm" |
Comment on lines
+1084
to
+1088
| requestBody: | ||
| content: | ||
| multipart/form-data: | ||
| schema: | ||
| type: file |
Comment on lines
+173
to
+185
| async function downloadItem(item: DriveItem) { | ||
| try { | ||
| const blob = await driveStore.downloadItem(item) | ||
| const url = URL.createObjectURL(blob) | ||
| const link = document.createElement('a') | ||
| link.href = url | ||
| link.download = item.name | ||
| link.click() | ||
| URL.revokeObjectURL(url) | ||
| } catch (err) { | ||
| notifyError(err, 'Unable to download file') | ||
| } | ||
| } |
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.