Skip to content

[FEATURE REQUEST] Sharing NG: Shared with me  #5020

Open

Description

@jesmrec

Shortcuts feature will take advantage of the Shares tab in the bottom bar:

Image

Current behaviour

Shares tab is active and shows the list of Shared with me items. Folders in the list are browseable and files are downloadable. Both files and folders can be set as av. offline.

Expected behaviour

Shares view should the list of items that are shared with me, including info like sync/no sync, or the user who shared. Also, the items in the list should respect the permission the were shared.

Documents provider should handle the Shares folder as a space, like now.

How to get the info:

GET https://<url>/graph/v1beta1/me/drive/sharedWithMe

Response's body will be a json object, that includes a value, an array with the items like:

{
   "value" : [
      {
         "@UI.Hidden" : false,
         "@client.synchronize" : true,
         "createdBy" : {
            "user" : {
               "@libre.graph.userType" : "Member",
               "displayName" : "Mark Phillips",
               "id" : "d68863e7-f2ea-4be6-92c7-02c5b7d7fd35"
            }
         },
         "eTag" : "\"ba0e6781b2b0968c394dfba58872db1a\"",
         "file" : {
            "mimeType" : "image/jpeg"
         },
         "id" : "a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!7f3fe702-9218-4dd5-b808-6ec8415f8690:d68863e7-f2ea-4be6-92c7-02c5b7d7fd35:3f6fae85-9b13-4a12-b3e6-15cfd758d35c",
         "lastModifiedDateTime" : "2015-12-31T09:20:46Z",
         "name" : "600_0985.JPG",
         "parentReference" : {
            "driveId" : "a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668",
            "driveType" : "virtual",
            "id" : "a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!a0ca6a90-a365-4782-871e-d44447bbc668"
         },
         "remoteItem" : {
            "createdBy" : {
               "user" : {
                  "@libre.graph.userType" : "Member",
                  "displayName" : "Mark Phillips",
                  "id" : "d68863e7-f2ea-4be6-92c7-02c5b7d7fd35"
               }
            },
            "eTag" : "\"ba0e6781b2b0968c394dfba58872db1a\"",
            "file" : {
               "mimeType" : "image/jpeg"
            },
            "id" : "7f3fe702-9218-4dd5-b808-6ec8415f8690$d68863e7-f2ea-4be6-92c7-02c5b7d7fd35!b0f37f7d-1f6c-4dc8-8fb6-dabe7834f2ec",
            "lastModifiedDateTime" : "2015-12-31T09:20:46Z",
            "name" : "600_0985.JPG",
            "parentReference" : {
               "driveId" : "7f3fe702-9218-4dd5-b808-6ec8415f8690$d68863e7-f2ea-4be6-92c7-02c5b7d7fd35!d68863e7-f2ea-4be6-92c7-02c5b7d7fd35",
               "driveType" : "personal"
            },
            "permissions" : [
               {
                  "createdDateTime" : "2026-10-16T08:19:33.256651171Z",
                  "grantedToV2" : {
                     "user" : {
                        "@libre.graph.userType" : "Member",
                        "displayName" : "John Smith",
                        "id" : "1f32db6f-69cd-4708-8d5b-07173af208ac"
                     }
                  },
                  "id" : "7f3fe702-9218-4dd5-b808-6ec8415f8690:d68863e7-f2ea-4be6-92c7-02c5b7d7fd35:3f6fae85-9b13-4a12-b3e6-15cfd758d35c",
                  "invitation" : {
                     "invitedBy" : {
                        "user" : {
                           "@libre.graph.userType" : "Member",
                           "displayName" : "Mark Phillips",
                           "id" : "d68863e7-f2ea-4be6-92c7-02c5b7d7fd35"
                        }
                     }
                  },
                  "roles" : [
                     "2d00ce52-1fc2-4dbc-8b95-a73b73395f5a"
                  ]
               }
            ],
            "size" : 3564157,
            "spaceId" : "7f3fe702-9218-4dd5-b808-6ec8415f8690$d68863e7-f2ea-4be6-92c7-02c5b7d7fd35"
         },
         "size" : 3564157
      },
      {
       ...
      },
      {
      ...
      }
  ]
}

endpoint contains much info.

Only to list those shares which "@UI.Hidden" property is false

The boolean field "@client.synchronize" could be reflected. That field points to let clients to get the files, but. On the left side of the item size, together with the sharing badge, another icon could be placed to show if the sync is enabled or disabled. Just as a extra info.

Other relevant fields: sharing permission, and the sharee, in case it could be displayed somehow, so that the user knows who shared.

Operations available: same as current behaviour: av offline, send/open with for files, browsing for folders. Share option available because the permalink reachability. But, inside the Share panel, sections Share with people and public links must be hidden. Just the permalink visible. This behaviour only affects the Shared with me . Shared with others and Shared via link should show such sections.

In case of folder browsing: if the sharee has edit permissions, the FAB button should be displayed to add new content inside. Web client also allows renaming and copying for items inside of a folder, but the copy is via clipboard, not available in Android app. Not a must.

Other considerations

If there is no shares to show in the tab, there is a placeholder view No shares. This is the example based in web client:

Screenshot 2026-11-23 at 08 48 05

Pending tasks

  • Grid mode / sort option

TASKS

  • Research (if needed)
  • Create branch feature/shared_with_me_shortcut
  • Development tasks
    • Implement the new logic and network operation
    • Display the shares screen with all the info(size, name, sharer...)
    • Display the synchronized badge
    • Hide the Shares and Public links section from Share screen
    • ...
    • Implement unit tests (if needed)
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch feature/feature_name into master

Activity

  1. changed the title [-][WIP] [FEATURE REQUEST] Sharing shortcuts[/-] [+][WIP] [FEATURE REQUEST] Sharing NG: shortcuts[/+] on Oct 16, 2026
  2. changed the title [-][WIP] [FEATURE REQUEST] Sharing NG: shortcuts[/-] [+][FEATURE REQUEST] Sharing shortcuts[/+] on Oct 19, 2026
  3. changed the title [-][FEATURE REQUEST] Sharing shortcuts[/-] [+][FEATURE REQUEST] Sharing NG: Sharing shortcuts[/+] on Oct 23, 2026
  4. added this to the 5.0 - Current milestone on Oct 23, 2026
  5. self-assigned this
    on Nov 17, 2026
  6. joragua commented on Nov 18, 2026

    @joragua
    Member

    Shared with me

    Problem

    The Shares tab does not use the Graph sharedWithMe endpoint. For a spaces-enabled account, FileDisplayActivity.navigateTo(FileListOption.SHARED_BY_LINK) either mounts a MainFileListFragment rooted at storageManager.getRootSharesFolder() — a plain WebDAV listing of the Shares jail — or, when that root folder has not been cached yet, falls back to SharesFragment, a placeholder that renders the No shares empty-dataset view and never queries the server at all. Either way the list carries no sharing context: OCFile has no field for who shared the resource, so the user sees a bare file list and has to open the web app to find out who shared an item. The client also has no notion of the @UI.Hidden flag, so shares the user has hidden cannot be honoured.

    The same Shares jail is exposed to other apps through the Documents Provider, where it is listed at the account root as a space row whose document id is the Shares jail root OCFile.id and whose children come from a WebDAV sync of that folder. Moving the in-app list to the Graph endpoint without touching the provider would leave the two surfaces showing different things, and would risk breaking the provider's folder altogether if the in-app flow stops being what keeps the Shares space row and the jail root OCFile populated.


    Desired behavior

    The Shared with me list in the Shares tab is populated from GET /graph/v1beta1/me/drive/sharedWithMe instead of the WebDAV Shares jail listing. Only shares whose @UI.Hidden is false are listed. Each entry shows the resource name and size as today, plus who shared it. Folders stay browseable, files stay downloadable, and both can still be set as available offline. The Share option stays available so the permalink remains reachable, but inside the share panel the Share with people and Public links sections are hidden — only the permalink button is left.

    Entries the server marks as synchronized (@client.synchronize set to true) carry a sync badge, shown next to the sharing badge and to the left of the item size, mirroring the badge the web client shows, so the user can tell at a glance whether a resource is synchronized.

    The Shares folder exposed by the Documents Provider is adapted so it keeps showing the same set of resources as the in-app Shared with me list, and keeps opening and listing correctly regardless of whether the in-app list still relies on the Shares jail root folder being cached.


    User stories

    • As a user, I want the Shared with me list to come from the server's own list of shares, so it matches what the web app shows me.
    • As a user, I want to see who shared each resource with me, so I know who to ask about it.
    • As a user, I want a badge on the resources that are synchronized, so I can tell their sync state at a glance like I do in the web client.
    • As a user, I don't want to see shares I have hidden.
    • As a user, I want to keep browsing folders, downloading files and setting items as available offline from this list.
    • As a user, I don't want the share panel to offer me sharing sections I cannot use on a resource shared with me.
    • As a user picking a file from another app, I want the Shares folder to show the same resources as the app's Shared with me list, so both surfaces agree.

    Constraints

    • Only the Shared with me list is covered here. The upper tab bar hosting the three lists (With me / With others / Via link) is introduced by the issue that adds the second list; until then the Shares tab keeps showing the Shared with me list full screen.
    • The role granted on each share is not surfaced in the list.
    • The sync badge reflects the server's @client.synchronize flag as read-only information. It is not a control: tapping it does nothing and it is unrelated to the app's available-offline state, which keeps using its own indicator.
    • In the Documents Provider only the existing Shares folder is touched; no new folders are added for the other two lists.

    Acceptance criteria

    • Opening the Shares tab issues GET /graph/v1beta1/me/drive/sharedWithMe for the current account.
    • Only items whose @UI.Hidden is false are listed.
    • Each entry shows the display name of the user who shared the resource.
    • No role or permission information is rendered in the list entries.
    • An entry whose @client.synchronize is true shows the sync badge next to the sharing badge, to the left of the item size.
    • An entry whose @client.synchronize is false or absent shows no sync badge.
    • The sync badge is purely informative — it is not tappable and it does not change the item's available-offline state.
    • The sync badge has a content description so it is announced by TalkBack.
    • Tapping a folder browses into it and tapping a file downloads/previews it, exactly as today.
    • Both files and folders in the list can still be set as available offline.
    • The empty-dataset view (No shares / You are not collaborating on other people's resources.) is shown only when the endpoint returns no visible shares.
    • Pull to refresh re-queries the endpoint.
    • On network or server error an error message is shown and the previously loaded list is kept.
    • For an item in this list, the share panel shows the permalink button and hides both the Share with people and the Public links sections.
    • The Shares folder still appears at the account root in the Documents Provider and opens without errors, with or without a prior visit to the Shares tab.
    • The children listed under that folder are the same visible shares as the in-app list — shares with @UI.Hidden set to true do not appear there either.
    • Opening, downloading and uploading through the Documents Provider inside the Shares folder keeps working as it does today, and create/rename/delete stay gated by the permissions of the item as before.
    • Legacy (non-spaces) accounts keep the current Shares tab and Documents Provider behaviour untouched.

    Out of scope

    • The Shared with others list (sharedByMe), both in the app and in the Documents Provider.
    • The Shared via link list (sharedByMe, link permissions), both in the app and in the Documents Provider.
    • The upper tab bar hosting the three lists, and the empty-state wording/art for the other two lists.
    • Showing the sharing permission / role granted on each list entry.
    • The FAB inside a folder shared with edit permission (covered by [FEATURE REQUEST] Upload (+) button missing inside received shares on oCIS, but present in Spaces #5003).
    • Renaming and copy-to-clipboard for items inside a shared folder (flagged as "not a must" in [FEATURE REQUEST] Sharing NG: Shared with me  #5020).
    • Letting the user change the synchronize state from the app — the badge only reflects what the server reports.
    • Classic OCS/WebDAV shares.

    Assumptions

    • GET /graph/v1beta1/me/drive/sharedWithMe takes no query parameters and returns the full list in value; no pagination handling is needed.
    • Each entry's remoteItem carries the real resource (id, name, size, file.mimeType, spaceId, parentReference.driveId), while the entry's own parentReference.driveId is the virtual Shares drive — already known in the codebase as OCSpace.SPACE_ID_SHARES.
    • @client.synchronize lives on the entry itself (not inside remoteItem) and is a plain boolean, so a missing value is treated as false.
    • Browsing, download and available offline keep working against the Shares jail WebDAV paths, so entries must stay reconcilable with OCFile rows — the Graph response drives and enriches the list, it does not replace file storage.
    • The Documents Provider keeps resolving its Shares folder through the Shares space row (SPACE_ID_SHARES) plus the jail root OCFile, so both rows must keep being populated and refreshed no matter what the in-app list does.
    • The permalink button lives in the share panel header (ShareActivity.setupFileHeader() → permanentLinkButton), outside GraphShareFragment, so hiding the fragment's two sections leaves the permalink visible with no header change.
    • The endpoint is only reachable on spaces-enabled accounts, so the legacy path stays as it is.

    Implementation notes

    The Shares tab, its navigation entry, its empty state and its Documents Provider folder already exist; what is missing is the Graph data source behind them and the enriched list on top.

    Already present (no changes expected, verify only):

    • Bottom-bar entry: bottom_navbar_menu.xml item nav_shared_by_link_files, retitled to R.string.bottom_nav_shares with the ic_ocis_shares icon for spaces-enabled accounts in DrawerActivity.setSpacesVisibilityBottomBar().
    • Navigation: FileDisplayActivity.navigateTo(), FileListOption.SHARED_BY_LINK branch (FileDisplayActivity.kt:1833-1848) plus initAndShowListOfShares().
    • SharesFragment (owncloudApp/.../presentation/shares/SharesFragment.kt), shares_fragment.xml, the item_empty_dataset include and the shares_list_empty_title / shares_list_empty_subtitle strings.
    • Shares drive id constant: OCSpace.SPACE_ID_SHARES.
    • Documents Provider: DocumentsStorageProvider.queryChildDocuments() already adds the Shares folder at the account root via GetSpaceByIdForAccountUseCase(accountName, SPACE_ID_SHARES) + GetFileByRemotePathUseCase(ROOT_PATH, SPACE_ID_SHARES) → SpaceCursor.addSpace(...) (DocumentsStorageProvider.kt:229-244); its children fall through to the regular FileCursor branch backed by SynchronizeFolderUseCase (REFRESH_FOLDER), and the space row itself is kept fresh by syncSpacesWithServer() → RefreshSpacesFromServerAsyncUseCase.
    • SpaceCursor.addSpace() derives the row display name from space.name, the icon from ic_spaces and FLAG_DIR_SUPPORTS_CREATE from the root folder permissions.
    • Graph GET pattern to copy: GetRemoteGraphSharesForFileOperation (GetMethod + Moshi + RemoteOperationResult), exposed through ShareService.getGraphShares(spaceId, itemId).
    • Moshi models reusable for the permissions array: MemberPermissionResponse, GrantedToV2Response, UserResponse, FileResponse in lib/resources/spaces/responses/SpacesResponse.kt.
    • Badge row to mirror for the sync badge: item_file_list.xml has a share_icons_layout LinearLayout anchored to the start of file_list_size, holding 15dp ImageViews (shared_via_users_icon, shared_by_link_icon) tinted with @color/list_item_lastmod_and_filesize_text; FileListAdapter toggles the row and each icon (FileListAdapter.kt:200-204). grid_item.xml carries the same row.
    • Shared badge in the file list: FileListAdapter already shows it for file.isSharedWithMe (FileListAdapter.kt:201).
    • Permalink button: ShareActivity.setupFileHeader() → binding.permanentLinkButton, independent of GraphShareFragment.

    Missing (the work for this issue):

    • owncloudComLibrary: new GetRemoteSharedWithMeOperation under lib/resources/shares/ targeting graph/v1beta1/me/drive/sharedWithMe, plus response models for the drive-item payload (value[], @UI.Hidden, @client.synchronize, createdBy, remoteItem, parentReference), reusing MemberPermissionResponse & co. for permissions.
    • owncloudComLibrary: expose it on ShareService and its implementation (getSharedWithMe()), next to getGraphShares.
    • owncloudData: remote datasource + mapper + repository method, following OCRemoteShareDataSource / OCShareRepository, or a dedicated datasource if the payload does not map cleanly onto OCShare.
    • owncloudDomain: model for a shared-with-me entry (resource + sharer + hidden flag + synchronized flag, the latter feeding the badge) and GetSharedWithMeAsyncUseCase.
    • owncloudApp: a SharesViewModel backing SharesFragment, exposing the list as a Flow of UIResult plus a refresh action.
    • owncloudApp: turn SharesFragment from a placeholder into the real list — RecyclerView + adapter rendering name, size, sharer and the sync badge, swipe to refresh, empty-dataset view only when the server returns no visible share, errors in a snackbar — keeping folder browsing, file download and available offline wired to the existing file actions.
    • owncloudApp: new vector drawable for the sync badge plus its content-description string. No existing asset fits — ic_available_offline and sync_pin already mean the app's own available-offline / local sync state and reusing either would read as that instead of the server's synchronize flag.
    • owncloudApp: add the sync badge ImageView to the shares list item layout inside the same badge row as the sharing icon, following the 15dp size and @color/list_item_lastmod_and_filesize_text tint of share_icons_layout, and toggle it from the entry's synchronized flag in the shares adapter.
    • owncloudApp: route the Shares tab to SharesFragment for spaces-enabled accounts instead of the current "is the Shares jail root cached?" fork in navigateTo(FileListOption.SHARED_BY_LINK).
    • owncloudApp: hide members_section and public_links_section in GraphShareFragment when the file is shared with me, leaving the header permalink as the only sharing affordance.
    • Documents Provider: make the children of the Shares folder agree with the new list — apply the same @UI.Hidden exclusion to what is listed under the Shares jail root, unless the WebDAV jail listing is confirmed to exclude those shares already (see below).
    • Documents Provider: make sure the in-app change does not remove the only code path that populates the Shares space row and the jail root OCFile. queryChildDocuments() resolves both by id/path, so if SharesFragment no longer depends on getRootSharesFolder(), the spaces + jail-root refresh must stay wired (the provider already triggers syncSpacesWithServer() on its own, so the gap, if any, is the jail root OCFile).
    • Koin wiring in RemoteDataSourceModule, RepositoryModule, UseCaseModule and ViewModelModule.
    • Unit tests for the new datasource and repository only, following OCRemoteShareDataSourceTest and OCShareRepositoryTest, with factories added to owncloudTestUtil. The remote operation, the use case and the presentation layer are not covered by tests in this issue.

    Verify before implementing:

    • Whether the sharer is taken from remoteItem.permissions[].invitation.invitedBy.user or from createdBy.user. Both are present in the sample payload and hold the same user; pick one and keep it consistent.
    • The sync badge icon with design, so it reads the same as the web client's badge rather than being invented here.
    • Whether the sync badge is also needed in grid mode. grid_item.xml has the same badge row, so it is cheap, but the shares list only ships in list mode in this issue.
    • Whether the Shares jail WebDAV listing already excludes @UI.Hidden shares server-side. If it does, the Documents Provider needs no filtering change and only the no-regression check applies; if it does not, the same exclusion has to be applied there too.
    • Whether the Shares row in the Documents Provider should keep space.name + ic_spaces or be aligned with the tab (bottom_nav_shares + ic_ocis_shares) — cosmetic only, worth agreeing with design before changing it.
    • Whether FLAG_DIR_SUPPORTS_CREATE is correct on the Shares row, given it is a jail root rather than a writable folder.
    • FileListOption has no SHARED_WITH_ME value — the tab still reuses SHARED_BY_LINK, which also feeds getMenuItemForFileListOption(), the toolbar title in updateToolbar() and MainFileListViewModel.onlySharedByLinkFiles. Decide whether a new enum value is needed now or whether reusing the existing one is acceptable until the other two lists land.
    • How browsing into a folder from this list resolves to an OCFile and a WebDAV path, given the Graph response identifies the item by remoteItem.id + spaceId while the current list is rooted at the Shares jail.
    • Whether GraphShareFragment can decide "shared with me" from OCFile.isSharedWithMe (which reads the OCS-style permissions string) on spaces-enabled accounts, or whether the flag has to be passed in from the list.

    Reference implementation to follow: the spaces list chain — GetRemoteSpacesOperation → OCSpacesService.getSpaces() → OCRemoteSpacesDataSource → OCSpacesRepository → GetPersonalAndProjectSpacesForAccountUseCase → SpacesListViewModel → SpacesListFragment — is the closest parallel for a Graph-sourced list rendered in its own fragment.

  7. changed the title [-][FEATURE REQUEST] Sharing NG: Sharing shortcuts[/-] [+][FEATURE REQUEST] Sharing NG: Shared with me [/+] on Nov 23, 2026
  8. linked a pull request that will close this issuefeat: shared with me shortcut #5060on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions