Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(site): allow updating workspace in TaskPage#21316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
johnstcn wants to merge7 commits intomain
base:main
Choose a base branch
Loading
fromcj/gh20925/task-start-latest-version

Conversation

@johnstcn
Copy link
Member

@johnstcnjohnstcn commentedDec 18, 2025
edited
Loading

Relates to#20925

This PR modifies TaskPage to update an outdated workspace instead of starting it. Before, starting an outdated workspace where the template required the active version would fail with the error "cannot use non-active version: rbac: forbidden".

For the case of a dormant workspace, I deemed it safe enough to simply unset dormancy on an attempted start (ref:#21306). However, automatically updating a workspace is a more risky option, so I instead elected to give the user the option of updating their workspace using the existing tooltip.

Screenshot 2025-12-18 at 13 52 15Screenshot 2025-12-18 at 13 52 29

Note: I made a change to theWorkspaceOutdatedTooltip components to allow it to have children so that the tooltip could trigger over a wider element instead of just the info icon.

<🤖 AI Disclaimer>I got some help from Gemini 3 Flash in "Ask" mode.</🤖 AI Disclaimer>

@johnstcnjohnstcn self-assigned thisDec 18, 2025
@johnstcnjohnstcn changed the titlefix(site): TaskPage: allow updating workspace in TaskPagefix(site): TaskPage: allow updating workspaceDec 18, 2025
@johnstcnjohnstcn changed the titlefix(site): TaskPage: allow updating workspacefix(site): allow updating workspace in TaskPageDec 18, 2025
Comment on lines 410 to 420
spyOn(API,"getTask").mockResolvedValue(MockTask);
spyOn(API,"getWorkspaceByOwnerAndName").mockResolvedValue({
...MockStoppedWorkspace,
outdated:true,
});
spyOn(API,"getTemplate").mockResolvedValue({
...MockTemplate,
active_version_id:"some-other-version-id",
});
spyOn(API,"getTemplateVersionRichParameters").mockResolvedValue([]);
spyOn(API,"getWorkspaceBuildParameters").mockResolvedValue([]);
Copy link
Contributor

Choose a reason for hiding this comment

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

These should be replaced with theparameters: { queries: { flow. SeeLongDisplayName for reference

johnstcn reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Done. This has the slightly annoying side-effect of queries happening after 5 seconds though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I think we need to schedule some time with the front end folk to address that

props,
)=>{
exportconstWorkspaceOutdatedTooltip:FC<
PropsWithChildren<WorkspaceOutdatedTooltipProps>
Copy link
Member

Choose a reason for hiding this comment

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

don't usePropsWithChildren like this pls, prefer just adding achildren?: ReactNode; property to the props type.

it keeps all of the props in one place. if someone doesn't notice this extra type in the middle here then it could be confusing.

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

Reviewers

@aslilacaslilacaslilac left review comments

@DanielleMaywoodDanielleMaywoodDanielleMaywood approved these changes

Assignees

@johnstcnjohnstcn

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@johnstcn@aslilac@DanielleMaywood

[8]ページ先頭

©2009-2025 Movatter.jp