Repository navigation
feat(assets): add folder-based Assets view with move and bulk actions - #238
Merged
Merged
Conversation
dvislov
marked this pull request as draft
September 11, 2026 10:49
dvislov
force-pushed
the
feat/assets-folder-view
branch
2 times, most recently
from
September 14, 2026 11:43
9ee8957 to
218a138
Compare
dvislov
marked this pull request as ready for review
September 15, 2026 08:38
dvislov
force-pushed
the
feat/assets-folder-view
branch
from
September 15, 2026 11:10
218a138 to
c205cde
Compare
Contributor
|
need rebase |
dvislov
force-pushed
the
feat/assets-folder-view
branch
from
September 17, 2026 07:54
c205cde to
413466e
Compare
Project Assets dumped every file into one flat table — folder was only a path label on the row, so finding a file meant scanning the whole list. Folder navigation is now the default: folders are first-class, clickable, and support nested paths, with the flat table kept as a secondary "All files" view. The workflow/session asset pickers group by folder too, with a folder header selecting its whole subtree at once. Folders are a persisted model (`Folder`), scoped like `Asset` to a Project or Company, with `FolderService` driving create / relocate (rename and move, sharing one cascade) / destroy (empty-only, or recursive with nested files going to trash). `Asset#folder` now allows nested `a/b/c` paths. Beyond the mockup, this also adds Drive-style file organizing: a "Move to folder" action (row-level and drag-and-drop) and a multi-select bar for bulk move/delete, backed by new `assets#update` / `assets#bulk_actions` endpoints and `AssetBulkService`. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_017LnXH16Mk6wcHU631ZG8Yi Signed-off-by: Dmitry Vislov <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
Permanent (hard) user deletion (#262) landed on develop in parallel with this branch. It relies on every authorship foreign key being ON DELETE :nullify so Postgres anonymises history rows instead of refusing the DELETE — EnablePermanentUserDeletion flipped all fourteen of them. `folders` was created on this branch with a NOT NULL `created_by_id` behind an ON DELETE RESTRICT foreign key, so it is the one table that migration could not know about. Permanently deleting anyone who has ever created a folder would raise ActiveRecord::InvalidForeignKey. No test caught it: the deletion suite predates folders, and the folder suite never deletes a user. Give the column the same treatment assets already get — nullable, ON DELETE :nullify, `optional: true` — and cover it from both sides. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
artempartos
force-pushed
the
feat/assets-folder-view
branch
from
September 17, 2026 15:24
413466e to
663a853
Compare
The folder view narrowed `Asset#folder` from "any label without a separator or control character" to `[a-zA-Z0-9_-]` segments. The PR describes that as widening — paths may now nest — but it also drops spaces and every non-Latin script, which asset folders have accepted since they were introduced. Nothing migrates the rows already named that way. Reads are unaffected, but every write path runs validations, including Asset#soft_delete!, which is a plain `update!`. A folder named "Отчёты" or "notes (draft)" could therefore no longer be moved, promoted, or deleted, and AssetBulkService would report the format error as a per-row skip reason. So a segment is free-form again — everything except `/`, `\` and control characters, the exact set Asset::FOLDER_FORMAT allowed — and nesting is layered on top rather than paid for. Two things come with that: - Asset::RESERVED_FOLDERS was lost in the rewrite. Without it a segment may be "..", which walks the path out of /workspace/assets entirely. It returns as Folder::RESERVED_SEGMENTS, now checked per segment, so "docs/.." is rejected too. The permissive charset is safe because every consumer shell-escapes the path (SessionContextService# download_file_to_container). - Allowing spaces again means "docs" and "docs " are two folders that render identically. A single outer strip used to prevent that, but nesting puts segments where it cannot reach, so Folder.normalize_path trims each segment instead and Asset.normalize_folder delegates to it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
This was referenced Nov 13, 2026
NOX73
added a commit
that referenced
this pull request
Nov 14, 2026
* feat(integrations): agents act as the user on GitLab (#238) Adds a gitlab provider to the unified OAuth engine over the deployment's GitLab OAuth app, act-as consent for gitlab, and the gitlab_user_token and gitlab_user_token_for tools sharing one concern with the GitHub pair. The profile's Connected accounts page shows both providers. Signed-off-by: Alex <[email protected]> * fix(integrations): resolve the shared Refusal error and update tests for gitlab as a known provider Signed-off-by: Alex <[email protected]> * test(integrations): use the implicit association style for the gitlab credential factory Signed-off-by: Alex <[email protected]> * chore(types): regenerate the ActAsConsent type digest Signed-off-by: Alex <[email protected]> * fix(profile): repair the Connected accounts page test and formatting Signed-off-by: Alex <[email protected]> * fix(profile): restore the Connected accounts page test Signed-off-by: Alex <[email protected]> * test(integrations): cover gitlab in UserConnections Signed-off-by: Alex <[email protected]> * fix(integrations): address review of the GitLab user token Revoke only current-host grants on disconnect, leave old-host grants to lapse, dispatch the latest connection through PROVIDERS, move identity onto OauthCredential, name the OAuth app and endpoints explicitly, stop refreshing early (R2), name the provider in accessible names, warn at the GitLab consent switches, and fix the GitLab guide. Signed-off-by: Alex <[email protected]> * refactor(integrations): the credential model owns the identity metadata key Github/Gitlab::UserConnection read the key from OauthCredential::IDENTITY_FIELDS; move this PR's changelog entry to Unreleased. Signed-off-by: Alex <[email protected]> * refactor(integrations): GitLab user calls use the gitlab gem; the OAuth engine revokes the grant Signed-off-by: Alex <[email protected]> * test(integrations): stub the GitLab revocation request in the disconnect test Signed-off-by: Alex <[email protected]> --------- Signed-off-by: Alex <[email protected]> Co-authored-by: Alex <[email protected]>
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.
Summary
Implements palad-ai/palad-app#564 — a Google Drive-style folder view for Project/Company Assets, plus a folder-aware asset picker for workflow/session creation, plus (by request) Drive-parity move and bulk actions beyond the mockup.
Project Assets used to dump every file into one flat table, with folder as just a path label on the row — finding a file meant scanning the whole list, and a folder wasn't a navigable object. Folder navigation is now the default view; the old flat table is kept as a secondary All files toggle.
What changed
Folders (backend)
Foldermodel, polymorphic-scoped to Project/Company likeAsset, with nested paths (dashboard/specs)FolderService: create,relocate!(one cascade primitive powering both rename and move, with collision guards against the DB unique index),destroy!(empty-only by default, orrecursive: truewhich soft-deletes nested files)Asset#foldernow allows/-nested paths (was single-segment only)POST/PATCH/DELETEfolder endpoints (project + company), policies,FolderResourceFolders (frontend)
AssetsContent.tsxreworked: Folders/All-files toggle (Folders default), breadcrumbs, New folder / Rename / Delete (with a non-empty-folder "Delete anyway" path), empty states — matching the reference mockupAsset picker
AssetPicker.tsx: a folder-grouped, searchable combobox replacing the plainMultiSelecteverywhere assets are attached to a workflow/step/session (5 call sites). A folder's header bulk-toggles every file under it — storage stays a plain array of asset ids, no backend resolution change. Empty folders don't appear (nothing to select).Drive parity beyond the mockup (requested)
@dnd-kit) onto a folder rowPATCH assets/:id(single move) andPOST assets/bulk_actions(bulk move/delete) endpoints,AssetBulkService, mirroring the Board's existing bulk-action patternOut of scope
Column sorting, grid/thumbnail view, right-click context menu — deliberately left out; can follow separately if wanted.
Testing
docker compose exec -T web make check_allgreen: rails-test, rubocop, brakeman, system-test, eslint, typescript, fsd, fe-test, vite-buildDocs
Updated the in-app "Using Flow" Assets guide (
app/frontend/pages/Docs/data/pages/assets.md) for folders, moving files, and the picker.🤖 Generated with Claude Code
https://claude.ai/code/session_017LnXH16Mk6wcHU631ZG8Yi