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: show task display name in task topbar#20957

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

Merged
ssncferreira merged 3 commits intomainfromssncferreira/fix-task-topbar-display-name
Nov 27, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletionssite/src/pages/TaskPage/TaskPage.stories.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
import {
MockDeletedWorkspace,
MockDisplayNameTasks,
MockFailedWorkspace,
MockStartingWorkspace,
MockStoppedWorkspace,
Expand DownExpand Up@@ -561,6 +562,38 @@ export const WorkspaceStartFailureWithDialog: Story = {
},
};

const longDisplayName =
"Implement comprehensive authentication and authorization system with role-based access control";
export const LongDisplayName: Story = {
parameters: {
queries: [
{
// Sidebar: uses getTasks() which returns an array
key: ["tasks", { owner: MockTask.owner_name }],
data: [
{ ...MockDisplayNameTasks[0], display_name: longDisplayName },
...MockDisplayNameTasks.slice(1),
],
},
{
// TaskTopbar: uses getTask() which returns a single task
key: ["tasks", MockTask.owner_name, MockTask.id],
data: { ...MockDisplayNameTasks[0], display_name: longDisplayName },
},
{
// Workspace data for the task
key: [
"workspace",
MockTask.owner_name,
MockTask.workspace_name,
"settings",
],
data: MockWorkspace,
},
],
},
};

function mockTaskWithWorkspace(
sidebarApp: WorkspaceApp,
activeApp: WorkspaceApp,
Expand Down
6 changes: 4 additions & 2 deletionssite/src/pages/TaskPage/TaskTopbar.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@ type TaskTopbarProps = { task: Task; workspace: Workspace };

export const TaskTopbar: FC<TaskTopbarProps> = ({ task, workspace }) => {
return (
<header className="flex flex-shrink-0 items-center p-3 border-solid border-border border-0 border-b">
<header className="flex flex-shrink-0 items-centergap-2p-3 border-solid border-border border-0 border-b">
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
Expand All@@ -38,7 +38,9 @@ export const TaskTopbar: FC<TaskTopbarProps> = ({ task, workspace }) => {
</Tooltip>
</TooltipProvider>

<h1 className="m-0 pl-2 text-base font-medium truncate">{task.name}</h1>
<h1 className="m-0 pl-2 text-base font-medium max-w-[520px] truncate">
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Just defaulting to the same value as in theTasks list view. In the backend, we also always guarantee that the display name is only 64 characters, which should not reach this maximum.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<h1className="m-0 pl-2 text-base font-medium max-w-[520px] truncate">
<h1className="m-0 pl-2 text-base font-medium max-w-[64ch] truncate">

We talked about this during our chat, unsure if we do this pattern elsewhere but it might look less magic to someone reading in the future

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

As discussed on Slack, it looks like this doesn’t exactly meet the 64-characters, which leads to the page width expanding, which isn’t ideal 🙁

{task.display_name}
</h1>

{task.current_state?.uri && (
<div className="flex items-center gap-2 flex-wrap ml-4">
Expand Down
4 changes: 2 additions & 2 deletionssite/src/testHelpers/entities.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4971,8 +4971,8 @@ export const MockAIPromptPresets: TypesGen.Preset[] = [

exportconstMockTask={
id:"test-task",
name:"wild-test-123",
display_name:"Task wild test",
name:"perform-some-task-123",
display_name:"Perform some task",
organization_id:MockOrganization.id,
owner_id:MockUserOwner.id,
owner_name:MockUserOwner.username,
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp