mengw15 opened a new pull request, #5168: URL: https://github.com/apache/texera/pull/5168
### What changes were proposed in this PR? `ShareAccessComponent.grantAccess` hard-coded the `dashboard/user/workflow/` path segment when constructing the share-notification email's "access the ... at ..." URL, regardless of which resource type the dialog was opened for. Because the dialog is opened with `type: "dataset"` / `type: "project"` / `type: "workflow"` from the respective list-item components, the link in the email for shared **datasets** and shared **projects** pointed at the workflow route and 404'd on click. Branch on `this.type` to pick the correct route from the existing `app-routing.constant.ts` constants: - `workflow` → `DASHBOARD_USER_WORKFLOW` (`/dashboard/user/workflow`) - `dataset` → `DASHBOARD_USER_DATASET` (`/dashboard/user/dataset`) - `project` → `DASHBOARD_USER_PROJECT` (`/dashboard/user/project`) `computing-unit` is unaffected — the existing `if (this.type !== "computing-unit")` guard already skips the URL line for that type. Note: the issue mentioned the dataset case only; the project case has the same defect and is fixed by the same change. ### Any related issues, documentation, discussions? Closes #5163. Follow-up to #4200 (which fixed the missing `/dashboard/user/` prefix on the same line per #3583); this fixes the remaining hard-coded `workflow` segment. ### How was this PR tested? No automated test added: `share-access.component.ts` has no existing spec file, and creating one would require mocking ~8 injected dependencies (`ShareAccessService`, `UserService`, `GmailService`, `NzModalRef`, `NotificationService`, `DatasetService`, `WorkflowPersistService`, `WorkflowActionService`, `FormBuilder`) before the `grantAccess` method could be exercised — disproportionate to a five-line fix. Verified locally: - `yarn prettier --check src/app/dashboard/component/user/share-access/share-access.component.ts` — clean. - TypeScript compiles (the new identifiers `DASHBOARD_USER_DATASET` / `DASHBOARD_USER_PROJECT` / `DASHBOARD_USER_WORKFLOW` are existing exports from `app-routing.constant.ts:33-37`). Manual verification path: 1. Share a dataset via the dataset list dashboard, entering a real email address. 2. Check the recipient's inbox: the link should now read `https://<host>/dashboard/user/dataset/<did>` and resolve to the dataset detail page on click. 3. Repeat for a project: link is `/dashboard/user/project/<pid>`. 4. Repeat for a workflow: link is `/dashboard/user/workflow/<wid>` (unchanged behavior). ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (claude-opus-4-7) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
