Skip to content

refactor: Drop /dashboard prefix from user-facing URLs#5151

Open
Ma77Ball wants to merge 11 commits into
apache:mainfrom
Ma77Ball:refactor/shortenURL
Open

refactor: Drop /dashboard prefix from user-facing URLs#5151
Ma77Ball wants to merge 11 commits into
apache:mainfrom
Ma77Ball:refactor/shortenURL

Conversation

@Ma77Ball
Copy link
Copy Markdown
Contributor

@Ma77Ball Ma77Ball commented May 22, 2026

What changes were proposed in this PR?

  • Shortens user-facing URLs by dropping the /dashboard segment: /dashboard/user/workflow/2358 becomes /user/workflow/2358.
  • Mounts DashboardComponent at path: "" instead of "dashboard" and sets DASHBOARD = "" so all derived route constants automatically shed the prefix.
  • Removes a dead top-level WorkspaceComponent root route whose guard always redirected; WorkspaceComponent stays reachable via /user/workflow/:id.
  • Updates three hardcoded /dashboard/... references (admin execution link, share-access message, navbar-hiding regex) and the Scala email-link path.

Any related issues, documentation, or discussions?

Closes: #4407

How was this PR tested?

  • Ran yarn format:fix (clean, 501 files unchanged).
  • Ran sbt scalafmtAll (clean).
  • Ran tsc --noEmit (no type errors).
  • Updated dashboard.component.spec.ts mock router URL to match new paths.
  • Manually verified that routing constants resolve to the expected shortened paths.

Before

Screenshot From 2026-05-23 04-11-22

After

Screenshot From 2026-05-23 04-11-04

Was this PR authored or co-authored using generative AI tooling?

Co-authored with Claude Opus 4.7 in compliance with ASF

@github-actions github-actions Bot added engine refactor Refactor the code frontend Changes related to the frontend GUI labels May 22, 2026
@Ma77Ball
Copy link
Copy Markdown
Contributor Author

@chenlica please assign a reviewer

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 22, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 43.61%. Comparing base (0f5f791) to head (ba62ea6).

Files with missing lines Patch % Lines
...che/texera/web/service/WorkflowEmailNotifier.scala 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5151      +/-   ##
============================================
- Coverage     43.66%   43.61%   -0.06%     
+ Complexity     2218     2215       -3     
============================================
  Files          1049     1049              
  Lines         40580    40483      -97     
  Branches       4324     4318       -6     
============================================
- Hits          17719    17656      -63     
+ Misses        21766    21729      -37     
- Partials       1095     1098       +3     
Flag Coverage Δ *Carryforward flag
access-control-service 39.53% <ø> (ø) Carriedforward from 0f5f791
agent-service 33.76% <ø> (ø) Carriedforward from 0f5f791
amber 43.92% <0.00%> (-0.03%) ⬇️
computing-unit-managing-service 1.38% <ø> (ø) Carriedforward from 0f5f791
config-service 19.35% <ø> (ø) Carriedforward from 0f5f791
file-service 32.18% <ø> (ø) Carriedforward from 0f5f791
frontend 35.00% <ø> (-0.16%) ⬇️ Carriedforward from 0f5f791
python 90.50% <ø> (ø) Carriedforward from 0f5f791
workflow-compiling-service 58.39% <ø> (ø) Carriedforward from 0f5f791

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Yicong-Huang
Copy link
Copy Markdown
Contributor

as this is user-facing, please include screenshot (of url difference).

@Yicong-Huang
Copy link
Copy Markdown
Contributor

please also make sure PR description fits our template, and fill the coverage. thanks

Comment thread frontend/src/app/app-routing.constant.ts Outdated
Comment thread frontend/src/app/app-routing.constant.ts Outdated
Copy link
Copy Markdown
Contributor

@Yicong-Huang Yicong-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found issues in PR template, coverage and some unrelated changes. Please review the PR once before you send it out for review.

Let's make sure authors to be the first reviewers of their PRs.

cc @chenlica @aglinxinyuan

@Ma77Ball
Copy link
Copy Markdown
Contributor Author

Ma77Ball commented May 22, 2026

Yes, some of my PRs are corrupted. Please hold out on review. I noticed them, but I am trying to fix them. The reason is that I am the only one editing the comment commands in our GitHub workflow, so my main has gotten out of sync with the Apache main.

@Yicong-Huang
Copy link
Copy Markdown
Contributor

Yicong-Huang commented May 22, 2026

Yes, some of my PRs are corrupted. Please hold out on review. I noticed them, but I am trying to fix them. The reason is that I am the only one editing the comment commands in our GitHub workflow, so my main has gotten out of sync with the Apache main.

Please mark PRs that are not ready for review as draft. Otherwise, we assume the PR is ready for review.

@Ma77Ball Ma77Ball changed the title refactor: Drop /dashboard prefix from user-facing URLs draft: Drop /dashboard prefix from user-facing URLs May 22, 2026
@Ma77Ball Ma77Ball force-pushed the refactor/shortenURL branch from dbad080 to 652269d Compare May 23, 2026 10:45
@Ma77Ball Ma77Ball changed the title draft: Drop /dashboard prefix from user-facing URLs refactor: Drop /dashboard prefix from user-facing URLs May 23, 2026
@Ma77Ball Ma77Ball requested a review from Yicong-Huang May 23, 2026 10:49
@Ma77Ball
Copy link
Copy Markdown
Contributor Author

Ma77Ball commented May 23, 2026

@Yicong-Huang, I added test coverage for existing spec files. I'll add the spec files for the untested hub and dashboard components in a separate pr. Please refer to this issue: #5167

@Ma77Ball
Copy link
Copy Markdown
Contributor Author

@Yicong-Huang, also, I have finished making changes. Please review again and I apologize for the prior issue.

Copy link
Copy Markdown
Contributor

@Yicong-Huang Yicong-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. left some inline comments please take care of them.

Comment on lines +145 to +149
it("routes projects to the user project page", () => {
component.entry = { id: 200, type: "project", ...baseStats } as unknown as DashboardEntry;
component.initializeEntry();
expect(component.entryLink).toEqual([USER_PROJECT, "200"]);
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still route projects?
cc @mengw15 @carloea2

Copy link
Copy Markdown
Contributor Author

@Ma77Ball Ma77Ball May 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking into this, I see that projects are still routed in routing.module.ts

path: "user",
canActivate: [AuthGuardService],
children: [
  {
    path: "project",
    component: UserProjectComponent,
  },
  {
    path: "project/:pid",
    component: UserProjectSectionComponent,
  },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's raise a separate issue to discuss what to do with projects.

Comment thread frontend/src/app/dashboard/component/dashboard.component.spec.ts
Comment thread frontend/src/app/dashboard/component/dashboard.component.ts Outdated
routes.push({
path: "dashboard",
path: "",
component: DashboardComponent,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have plan to rename this component?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not to my knowledge

Comment on lines -177 to -184
// default route renders the workspace editor directly; if userSystem is enabled at runtime,
// AppComponent will navigate to DASHBOARD_ABOUT instead.
routes.push({
path: "",
component: WorkspaceComponent,
canActivate: [rootRedirectGuard],
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems unintended change. can we move it out from this PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make sure to update PR description after this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Ma77Ball added 2 commits May 23, 2026 19:05
Added default route to render WorkspaceComponent with guard.

Signed-off-by: Matthew B. <mgball@uci.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine frontend Changes related to the frontend GUI refactor Refactor the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shorten url by removing subdirectory "dashboard"

3 participants