Repository navigation
Description
Signed-in users on /dashboard cannot see private datasets on which they have been invited as a collaborator (such as nm000974), and clicking the Collaborators button on a private draft dataset redirects to /404.
- Where it stands: reported on November 18, 2026 from
/dashboardafter Karina Roddey invited Arno as a collaborator on the private datasetnm000974. - Missing collaborated datasets:
listMyDatasetson/dashboardcallsGET /datasets?mine=true, which filters strictly byd.owner_user_id = ?and omits rows fromdataset_collaborators(https://github.com/nemarOrg/website/blob/main/src/pages/dashboard.astro#L58). - Collaborators page 404 on private datasets:
/dataset/[id]/collaboratorscallsgetDataset(datasetId, { fresh: true })without forwardingcookieHeader, soGET /datasets/:idreturns 404 for every private dataset and the page redirects to/404(https://github.com/nemarOrg/website/blob/main/src/pages/dataset/%5Bid%5D/collaborators.astro#L35-L42). - Collaborators page 404 for non-owner collaborators:
GET /datasets/:id/collaboratorsinnemar-clireturns 403 for collaborators who are neither the owner nor an admin, whichcollaborators.astroalso redirects to/404, even though the page template includes a read-only notice for collaborators (https://github.com/nemarOrg/website/blob/main/src/pages/dataset/%5Bid%5D/collaborators.astro#L61-L65). - Related backend issues:
nemarOrg/nemar-cli#2196(Collaborator invitations blocked: expired GitHub invite leaves user recorded as collaborator, re-invite returns 409, no access nemar-cli#2196) andnemarOrg/nemar-cli#2203(List and facets hide private datasets from owners and collaborators nemar-cli#2203).
Root causes and proposed fixes
1. Collaborated datasets are missing from /dashboard
In src/pages/dashboard.astro (line 58) and src/lib/dashboard-api.ts (lines 178 to 204), /dashboard fetches GET /datasets?mine=true.
In nemarOrg/nemar-cli (backend/src/routes/datasets/catalog.ts, lines 1012 to 1016), the ?mine=true query only checks ownership:
FROM datasets d
JOIN users u ON d.owner_user_id = u.id
WHERE d.status = ? AND d.owner_user_id = ?Datasets where the authenticated user is recorded in dataset_collaborators are excluded from GET /datasets?mine=true, and /dashboard makes no separate query for collaborated datasets. When Karina uploaded nm000974 privately and invited Arno as a collaborator, nm000974 did not appear on Arno's dashboard (which listed only his two owned datasets, nm000226 and nm000115).
In addition, visiting /dataset/nm000974 directly (src/pages/dataset/[id].astro, lines 69 to 72) calls getLandingOutcome(id) and getMetadataOutcome(id) against data.nemar.org without session credentials, which returns 404 for unpublished private drafts.
Proposed fix:
- Include datasets where the caller is in
dataset_collaboratorsinGET /datasets?mine=true(or exposecollaborated=true/ return an access role on each row), and display collaborated datasets on/dashboard(either in the main list with aCollaboratorbadge instead of"owned by you", or in a dedicated"Shared with you"section). - On
/dataset/[id].astro, allow owners, collaborators, and admins to view private draft datasets using authenticated catalog and repository metadata when publicdata.nemar.orgfiles are not published yet.
2. Clicking "Collaborators" on /dashboard redirects to /404
On /dashboard, src/components/MyDatasetCard.astro (lines 139 to 146) renders a Collaborators button pointing to /dataset/<id>/collaborators.
In src/pages/dataset/[id]/collaborators.astro (lines 31 to 42), the SSR handler fetches the dataset row through getDataset(datasetId, { fresh: true }) (src/lib/api.ts, lines 326 to 340). However, getDataset does not accept or forward cookieHeader:
getDataset(datasetId, { fresh: true })sends an unauthenticated request toGET /datasets/:id.- In
nemarOrg/nemar-cli(backend/src/routes/datasets/catalog.ts, lines 1517 to 1544),GET /datasets/:idreturns404 Dataset not foundwheneverdataset.visibility !== "public"and no authenticated user is present on the request. collaborators.astrocatchesisMissing(err)and returnsAstro.redirect("/404"). ClickingCollaboratorson any private draft dataset on/dashboard(such asnm000226) therefore redirects to/404, even for the dataset owner or an admin.
Furthermore, collaborators.astro (lines 117 to 120) renders a read-only banner for non-owner collaborators ("You can see the list because you collaborate on this dataset, but only the owner or an admin can invite or remove people"), but GET /datasets/:id/collaborators in nemarOrg/nemar-cli (backend/src/routes/datasets/collaborators.ts, lines 684 to 686) rejects non-owner collaborators with 403, which collaborators.astro (lines 61 to 65) also redirects to /404.
Proposed fix:
- Forward
cookieHeader(and bypass the shared public cache when authenticated) whencollaborators.astrofetches the dataset row fromGET /datasets/:id. - Allow dataset collaborators to read
GET /datasets/:id/collaboratorson the backend so the read-only collaborator view incollaborators.astroworks instead of redirecting to/404.
Activity