Skip to content

fix(dashboard): copy workflow opens preview page instead of workspace#4280

Open
seongjinyoon wants to merge 2 commits intoapache:mainfrom
seongjinyoon:fix/copy-workflow-opens-workspace
Open

fix(dashboard): copy workflow opens preview page instead of workspace#4280
seongjinyoon wants to merge 2 commits intoapache:mainfrom
seongjinyoon:fix/copy-workflow-opens-workspace

Conversation

@seongjinyoon
Copy link
Contributor

What changes were proposed in this PR?

Problem:
When copying a workflow from the "Workflows" tab under "Your Work", clicking on the newly copied workflow incorrectly redirected to the preview page instead of opening it in the workspace. More on #3829

Root Cause:
After a workflow is copied, a new DashboardEntry is constructed, manually appending information such as owner's name, and avatar. However, the issue is that the list of user IDs with access was not appended, causing the routing to go to the preview page.

Fix:
Instead of the current hardcoded method of constructing DashboardEntry objects, the proposed method reuses the extendSearchResultsWithHubActivityInfo() method in SearchService. This ensures the owner info and access info are fetched from the backend consistently and is correctly populated.

Changes:
user-workflow.component.ts:

  • Replaced the manual construction of DashboardEntry to reusing the extendSearchResultsWithHubActivityInfo() method in SearchService.
  • Removed the UserInfo import.

Any related issues, documentation, discussions?

Closes #3829

How was this PR tested?

Manually tested

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

Revised with Claude Code.

@github-actions github-actions bot added fix frontend Changes related to the frontend GUI labels Mar 11, 2026
@chenlica chenlica requested a review from kunwp1 March 11, 2026 06:36
@chenlica
Copy link
Contributor

@kunwp1 Please review it.

Copy link
Contributor

@kunwp1 kunwp1 left a comment

Choose a reason for hiding this comment

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

Your change fixes the issue but I suggest you address the comment below.

workflow: w,
}));
const newEntries = await firstValueFrom(
this.searchService.extendSearchResultsWithHubActivityInfo(searchResultItems, this.isLogin, ["access"])
Copy link
Contributor

@kunwp1 kunwp1 Mar 12, 2026

Choose a reason for hiding this comment

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

I think your fix is an overkill. Your fix relies on Hub service for a new duplicated workflow which is adding an extra network call. For a workflow we just duplicated, frontend already knows a current user is the owner of the workflow. So I suggest you fix the place that decides the link (whether to open a workspace or a preview page).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copied Workflow Opens Preview Page Instead of Workspace

3 participants