Repository navigation
Description
Description
Content Drive can express only one browse scope today: everything on the current site, at every depth, with System Host mixed in. Two things in the current implementation cause it.
The site root drops the folder constraint. When the path resolves to the site root, ContentDriveHelper sets skipFolder(true), and the SQL then never applies its id.parent_path = ? filter. Its own comment says why: "if we're setting a site-name directly, we care for all subfolders." So //site/ does not mean "the site root", it means "the whole site", and there is no way to ask for the items that sit at the root.
System Host can be added, never isolated. The host clause has two forms, +conhost:<site> or +(conhost:<site> OR conhost:SYSTEM_HOST). No branch produces System Host alone. appendSystemHostQuery in BrowserAPIImpl already emits id.host_inode = 'SYSTEM_HOST', but it is unreachable: it only fires when the query carries no site at all.
The two query builders disagree. buildPureESQuery forces the widened host clause whenever the folder is the system folder, regardless of what the caller asked for, while the SQL path honours the flag. Under the default HYBRID_SINGLE_CHUNKED_QUERY_ES heuristic the SQL clause governs, so this only bites under PURE_ES today, but the two must agree before scopes mean anything.
The practical consequence is that "browse the site" and "browse the site root" are the same request, and a user cannot get to System Host on its own at all.
What we need
Three scopes, surfaced in the sidebar. All and System Host are plain sections, not tree nodes: no expand arrow, no children, no folder semantics.
| Sidebar entry | Content | Folders | System Host | Accepts drops |
|---|---|---|---|---|
| All (top) | The whole site, any depth | None, content only | The "Show System Host" chip decides | No. It is a view, not a destination |
| Site row, under SITE HIERARCHY | Only the items sitting at the site root | The top-level folders | Never | Yes, as today |
| A folder in the tree | Unchanged | Unchanged | Never | Yes, as today |
| System Host (bottom) | System Host content only | None. System Host has no folders | Only System Host | Yes, dropping moves content to System Host |
The item counts in the prototype are not part of this.
What needs to change
Backend
- A
scopefield on the drive request form:ALL | ROOT | SYSTEM_HOST, defaulting toALLso existing callers keep today's behavior. The AssetPicker shares this endpoint and has no scope concept, so the default leaves it untouched. ROOTsimply stops callingskipFolder(true). The system folder's path is/, so the existing folder predicate already produces the right query.SYSTEM_HOSTreaches theid.host_inode = 'SYSTEM_HOST'clause that already exists. To make that branch reachable while a site is present,forceSystemHostonBrowserQuerybecomes three-state (include, exclude, only). Content Drive is its only caller, so the boolean can go.buildPureESQueryreads the same three-state instead of forcing System Host in whenever the folder is the system folder.includeSystemHoststays its own field, honored only whenscopeisALLand ignored otherwise.- Confirm the move endpoint accepts System Host as a destination. Moving to a host root is a different shape from moving into a folder, and dropping onto the System Host section depends on it.
Frontend
- Sidebar: an All section, the SITE HIERARCHY tree, and a System Host section. Selection is exclusive across the three. System Host is a drop target for both move and upload; All is inert.
- The site row now means the site root, so it stops listing everything on the site. In the All scope the listing stops requesting folders entirely, so the folder-only affordances in the table have nothing to act on there.
- Rename the "Show Shared Assets" chip to "Show System Host". Label only: the filter key stays
sharedAssets, which is seeded into every Content Drive URL and is shared with the AssetPicker, so renaming the key would break links already in circulation and both surfaces at once. - The chip appears only in the All scope, and keeps its value while another scope is selected so returning to All restores the choice. It cannot apply anywhere else: System Host content only ever sits at the System Host root, so it can never appear inside a site folder.
- Scope survives a URL restore like the other filters, so a shared link lands on the same view.
Tests
There is no coverage for includeSystemHost anywhere in Content Drive today. Each scope needs integration coverage, and a new test class has to be registered in a MainSuite or CI silently never runs it.
Out of scope
- "Children of the site root" as a separate scope. System Host has no folders, and site content cannot live under System Host, so the site hierarchy already covers everything below the root.
- Item counts next to the sidebar entries. Prototype only.
Adjacent bug, filed separately if it does not block this
Inside a folder, ContentDriveHelper sets ignoreSiteForFolders(true) and selectQuery then skips the host clause entirely. The only surviving constraint is id.parent_path = ?, which matches a path string rather than a folder id, so a folder path that exists on two sites can return content from both. Every scope here is defined relative to "the current site", so this is worth resolving alongside them.
Additional Context
Prototype and discussion
Related: #37166, which touches how Content Drive reports operations and surfaced this while looking at what a move actually changes in the listing.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]Content Drive: browse scopes for site, site root, root children and System Host[/-][+][TASK] Content Drive: browse scopes for site, site root, root children and System Host[/+][-][TASK] Content Drive: browse scopes for site, site root, root children and System Host[/-][+][TASK] Content Drive: browse scopes for All, site root and System Host[/+]github-actions commentedon Sep 9, 2026
PRs linked to this issue
docs(content-drive): settle what the drive opens on, for #37426
docs(content-drive): answer the spec review, for #37426
48 remaining items
fix(content-drive): use PrimeNG's own row states instead of hand-writ…
fix(content-drive): stop empty tree space claiming the site root as a…
revert(content-drive): restore the tree's original drop-target resolu…
style(core-web): satisfy the format check on two files (#37426)
fix(content-drive): let a search find folders in all site content (#3…
KevinDavilaDotCMS commentedon Sep 21, 2026
Passed QA
Tested in main using
dotcms/dotcms:main_ba7ab6f2026-09-21.12-13-45.mov
Summary
Manual QA for PR #37487 (issue #37426), which splits Content Drive's browse scope into All Site Content, the site root, and System Host, adds a "Show System Host" toggle scoped to All Site Content, and makes System Host a drag-and-drop move destination. 11 cases were executed by hand against a local dotCMS instance. Result: 11 Passed, 0 Failed.
Test Cases
Test ID: TC-001
Issues: [TASK] Content Drive: browse scopes for All, site root and System Host #37426
Test Name: Selecting the site row lists only what sits at the root, not nested content
Risk: Critical
Scenario: Happy Path
Steps To Reproduce:
a. On an existing site, create one piece of content directly at the root (no folder) and another inside a top-level folder.
b. Open Content Drive for that site.
c. In the sidebar, select the site row (under SITE HIERARCHY).
Result: The listing showed the root-level content and the site's top-level folders only; the content inside the folder did not appear.
Test ID: TC-002
Issues: [TASK] Content Drive: browse scopes for All, site root and System Host #37426
Test Name: System Host lists shared content only, no folders
Risk: Critical
Scenario: Happy Path
Steps To Reproduce:
a. With content published on System Host and different content on the current site, open Content Drive.
b. Select the System Host entry at the bottom of the sidebar.
Result: The listing showed only System Host content; no site content appeared and no folders or expand controls were offered.
Test ID: TC-003
Issues: [TASK] Content Drive: browse scopes for All, site root and System Host #37426
Test Name: Uploading a file from All Site Content lands it at the site root
Risk: High
Scenario: Happy Path
Steps To Reproduce:
a. Select All Site Content in the sidebar.
b. Upload a file (drag & drop or the upload button) from that v
c. Switch to the site row (root).
Result: The uploaded file appeared listed at the site root, notite Content accepted the upload and landed it at the root.
Test ID: TC-004
Issues: [TASK] Content Drive: browse scopes for All, site root and System Host #37426
Test Name: Dragging content from a site and dropping it on Syst
Risk: High
Scenario: Happy Path
Steps To Reproduce:
a. Select a site in Content Drive and locate an existing conten
b. Drag it with the mouse onto the System Host entry in the sidebar and drop it.
c. Select the System Host entry.
Result: The content moved to System Host and no longer appeared in the original site's listing. Confirmed for content types with a Move workflow action
configured; there is no generic global move.
Test ID: TC-005
Issues: [TASK] Content Drive: browse scopes for All, site root and System Host #37426
Test Name: The "Show System Host" toggle and its sentence only
Risk: High
Scenario: Happy Path
Steps To Reproduce:
a. Select All Site Content. Verify a bar appears above the list"All Files in site (System Host shared files included)" or"...excluded") and a toggle control.
b. Turn the toggle on and confirm System Host content appears m it off and confirm it disappears.
c. Select the site row (root) and then a folder.
Result: The bar and toggle showed only in All Site Content, andluded/excluded System Host content. Neither the bar nor the toggle appeared in the site root or folder scopes.
Test ID: TC-006
Issues: [TASK] Content Drive: browse scopes for All, site root and System Host #37426
Test Name: The toggle retains its value when switching scope and back
Risk: Medium
Scenario: Edge
Steps To Reproduce:
a. In All Site Content, turn "Show System Host" on.
b. Switch to the site row, then to a folder, then back to All S
Result: The toggle was still on when returning to All Site Content, with no need to re-enable it.
Test ID: TC-007
Issues: [TASK] Content Drive: browse scopes for All, site root and System Host #37426
Test Name: A Content Drive link saved before this change still opens the same view
Risk: High
Scenario: Negative
Steps To Reproduce:
a. Generate or identify a Content Drive URL with no location parameter (equivalent to a link shared before this feature) for a given site.
b. Open it in a new tab.
Result: The link opened on All Site Content with no errors, matching the "whole site" behavior that existed before this change.
Test ID: TC-008
Issues: [TASK] Content Drive: browse scopes for All, site root and System Host #37426
Test Name: Switching sites with System Host selected
Risk: Medium
Scenario: Edge
Steps To Reproduce:
a. Select System Host in the sidebar.
b. Use the site switcher to change to a different site.
Result: Switching sites returned the drive to All Site Content; confirmed by the tester as the expected behavior.
Test ID: TC-009
Issues: [TASK] Content Drive: browse scopes for All, site root and System Host #37426
Test Name: A user without read permission on System Host does not see the entry
Risk: High
Scenario: Negative
Steps To Reproduce:
a. Create or use a user with no read permission on System Host.
b. Log in as that user and open Content Drive.
c. Try opening a URL that points directly at the System Host scope.
Result: The System Host entry did not appear in the sidebar for URL to that scope silently redirected to All Site Content.
Test ID: TC-010
Issues: [TASK] Content Drive: browse scopes for All, site root and System Host #37426
Test Name: Uploading to System Host validates permissions againitcher's site
Risk: Medium
Scenario: Negative
Steps To Reproduce:
a. With a user who has write permission on the site currently st NOT on System Host, select System Host in the sidebar.
b. Try to upload a file or create content there.
Result: The upload/create action was refused for that user, eveld upload content to the active site in the switcher.
Test ID: TC-011
Issues: [TASK] Content Drive: browse scopes for All, site root and System Host #37426
Test Name: A site with no content at its root
Risk: Low
Scenario: Edge
Steps To Reproduce:
a. Use (or create) a site with no content directly at its root,
b. Select that site's row in the sidebar.
Result: The listing showed only the top-level folders, with no the whole site's content.