Skip to content

fix(desktop): use task title as workspace name when opening a task#3678

Merged
saddlepaddle merged 1 commit into
mainfrom
saddlepaddle/linear-integration-techniques-and-methods
Apr 23, 2026
Merged

fix(desktop): use task title as workspace name when opening a task#3678
saddlepaddle merged 1 commit into
mainfrom
saddlepaddle/linear-integration-techniques-and-methods

Conversation

@saddlepaddle
Copy link
Copy Markdown
Collaborator

@saddlepaddle saddlepaddle commented Apr 23, 2026

Summary

  • Task→workspace entry points (Properties sidebar "Open in workspace" and bulk "Run in workspace") now set the workspace name to task.title instead of task.slug, so the sidebar shows e.g. "Fix auth middleware" rather than "SUPER-172".
  • Branch names are unchanged — still derived via deriveBranchName({slug, title}) (e.g. super-172-fix-auth-middleware), so the Linear/GitHub identifier stays in the branch for traceability.

Test plan

  • Open a synced Linear task via the task properties sidebar → new workspace shows the task title in the sidebar, branch still prefixed with the Linear identifier.
  • Bulk-select Linear tasks and use "Run in workspace" → each created workspace uses its task's title.
  • Open a local (non-external) task → workspace name matches its title; branch still prefixed with the local slug.

Summary by cubic

Use the task title as the workspace name when opening a task, so users see a human-readable name instead of the slug. Branch names are unchanged and still include the Linear/GitHub identifier via deriveBranchName({ slug, title }).

Written for commit 21e0284. Summary will update on new commits.

Summary by CodeRabbit

  • Bug Fixes
    • Workspaces created when opening tasks now use the full task title instead of the slug, providing more descriptive and user-friendly workspace names.

The branch still uses deriveBranchName({slug, title}) so the Linear/GitHub
identifier stays in the branch for traceability; only the displayed
workspace name switches from e.g. "SUPER-172" to the human-readable title.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 88baad51-e09d-459f-8e43-ff1a32cbb5da

📥 Commits

Reviewing files that changed from the base of the PR and between ae5cd60 and 21e0284.

📒 Files selected for processing (2)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/components/PropertiesSidebar/components/OpenInWorkspace/OpenInWorkspace.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/components/TasksView/components/TasksTopBar/components/RunInWorkspacePopover/RunInWorkspacePopover.tsx

📝 Walkthrough

Walkthrough

Two workspace creation calls are modified to use task.title instead of task.slug as the workspace name parameter. This affects workspace naming when opening tasks in workspace contexts across the desktop renderer.

Changes

Cohort / File(s) Summary
Workspace Name Parameter Update
apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/components/PropertiesSidebar/components/OpenInWorkspace/OpenInWorkspace.tsx, apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/components/TasksView/components/TasksTopBar/components/RunInWorkspacePopover/RunInWorkspacePopover.tsx
Changed createWorkspace.mutateAsyncWithPendingSetup calls to use task.title instead of task.slug as the workspace name parameter.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

🐰 A curious change hops through the code so clean,
Where slugs become titles—a shift unforeseen,
In workspaces bright where tasks find their place,
The title now guides with a friendlier face!
🌟

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch saddlepaddle/linear-integration-techniques-and-methods

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@saddlepaddle saddlepaddle merged commit 4a1af2e into main Apr 23, 2026
6 of 7 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch

Thank you for your contribution! 🎉

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 23, 2026

Greptile Summary

This PR updates both task-to-workspace entry points (OpenInWorkspace and RunInWorkspacePopover) to use task.title instead of task.slug as the workspace display name, while keeping branch names slug-based via deriveBranchName. The intent is solid UX improvement — showing "Fix auth middleware" rather than "SUPER-172" in the sidebar.

Key concerns:

  • Workspace deduplication collision (P1): createWorkspace.mutateAsyncWithPendingSetup deduplicates by projectId + name. Slugs are unique per project, so the old code was collision-free. Titles are free-form and can repeat, meaning two tasks with the same title will share a workspace (wasExisting: true), causing the second task's agent to run in the first task's workspace instead of a new one. This is most acute in the bulk "Run in Workspace" path where same-titled tasks in the same batch will silently collapse.
  • Empty title fallback (P2): task.title may be empty or undefined for draft/untitled tasks; a fallback to task.slug would prevent passing a blank name to the backend.
  • Batch progress display (P2): The batch status list still shows task.slug while the workspace name is now task.title, creating a minor UX inconsistency.

Confidence Score: 3/5

Not safe to merge without resolving the workspace deduplication collision — same-title tasks will silently share a workspace.

The change is a trivial one-liner in two places and the UX goal is clear, but the workspace deduplication logic keys on name, and switching from the always-unique task.slug to the user-editable task.title introduces a real scenario where two tasks collapse onto the same workspace. This is especially risky in the bulk "Run in Workspace" flow.

Both changed files share the same P1 issue; the backend createWorkspace implementation (not in this PR) would also need review to confirm deduplication semantics.

Important Files Changed

Filename Overview
apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/components/PropertiesSidebar/components/OpenInWorkspace/OpenInWorkspace.tsx Single-line change: workspace name switched from task.slug to task.title. Introduces a potential workspace collision for same-title tasks and lacks a fallback for empty titles.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/components/TasksView/components/TasksTopBar/components/RunInWorkspacePopover/RunInWorkspacePopover.tsx Single-line change matching OpenInWorkspace. The bulk path amplifies the collision risk: multiple same-title tasks selected together will all map to the same workspace. Progress list still displays task.slug, creating a minor UX inconsistency.

Sequence Diagram

sequenceDiagram
    participant U as User
    participant OIW as OpenInWorkspace / RunInWorkspacePopover
    participant CW as createWorkspace
    participant BE as Backend

    U->>OIW: Click "Open in Workspace"
    OIW->>OIW: deriveBranchName({slug, title}) → branchName
    OIW->>CW: mutateAsyncWithPendingSetup({projectId, name: task.title, branchName})
    CW->>BE: Create or find workspace by (projectId + name)
    alt name is unique (happy path)
        BE-->>CW: {workspace, wasExisting: false}
        CW-->>OIW: New workspace created ✓
    else same title exists (collision)
        BE-->>CW: {workspace, wasExisting: true}
        CW-->>OIW: wasExisting=true → agent re-launched in WRONG workspace ✗
    end
    OIW-->>U: toast success
Loading

Comments Outside Diff (1)

  1. apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/components/TasksView/components/TasksTopBar/components/RunInWorkspacePopover/RunInWorkspacePopover.tsx, line 369 (link)

    P2 Batch status list still shows task.slug, not task.title

    The progress list during bulk creation still identifies tasks by their slug (line 369: {task.slug}), while the workspace is now named after their title. This creates a slight UX mismatch — the user sees the slug in the progress list but the workspace opens with the title as its name. Depending on intent, you may want to show task.title here (or task.title ?? task.slug) so the progress list matches what the user will see in the sidebar.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/components/TasksView/components/TasksTopBar/components/RunInWorkspacePopover/RunInWorkspacePopover.tsx
    Line: 369
    
    Comment:
    **Batch status list still shows `task.slug`, not `task.title`**
    
    The progress list during bulk creation still identifies tasks by their slug (line 369: `{task.slug}`), while the workspace is now named after their title. This creates a slight UX mismatch — the user sees the slug in the progress list but the workspace opens with the title as its name. Depending on intent, you may want to show `task.title` here (or `task.title ?? task.slug`) so the progress list matches what the user will see in the sidebar.
    
    
    
    How can I resolve this? If you propose a fix, please make it concise.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix All With AI
This is a comment left during a code review.
Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/components/PropertiesSidebar/components/OpenInWorkspace/OpenInWorkspace.tsx
Line: 124

Comment:
**Possible workspace collision on same-title tasks**

`createWorkspace.mutateAsyncWithPendingSetup` deduplicates by `projectId` + `name` (evidenced by the `result.wasExisting` check). When `name` was `task.slug`, collisions were impossible because slugs are unique per project. Now that `name` is `task.title`, two tasks in the same project that share a title (e.g., both called `"Fix auth middleware"`) will match the same workspace: the second open-in-workspace call will return `wasExisting: true` and launch a new agent session inside the first task's workspace instead of creating a fresh one.

If workspace deduplication is also expected to key on `branchName`, this may be safe, but the code path for `result.wasExisting` only re-runs `launchAgentSession` — it does not verify that the found workspace's branch matches the current task's branch.

Consider appending the slug to keep uniqueness while still showing a human-friendly name, e.g.:

```ts
name: task.title ? `${task.title} (${task.slug})` : task.slug,
```

or guarantee uniqueness by checking whether the backend deduplication key includes `branchName`.

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/components/TasksView/components/TasksTopBar/components/RunInWorkspacePopover/RunInWorkspacePopover.tsx
Line: 177

Comment:
**Same workspace-collision risk as in `OpenInWorkspace`**

The same deduplication concern applies here. In the bulk path this is especially impactful: if a user bulk-selects multiple tasks that happen to have the same title, only the first one creates a new workspace; all subsequent ones will hit `wasExisting: true` and inject their agent launch request into the same pre-existing workspace, rather than each getting their own isolated environment.

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/components/PropertiesSidebar/components/OpenInWorkspace/OpenInWorkspace.tsx
Line: 124

Comment:
**Missing guard for empty/undefined `task.title`**

`task.title` is typed as part of `TaskWithStatus` but tasks can exist in a draft/untitled state (e.g., a task created without a title yet). Passing an empty string or `undefined` as `name` to `createWorkspace` may be rejected by the backend or silently create a workspace with a blank name. The previous `task.slug` was always a non-empty structured identifier.

Consider adding a fallback:

```suggestion
					name: task.title || task.slug,
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/components/TasksView/components/TasksTopBar/components/RunInWorkspacePopover/RunInWorkspacePopover.tsx
Line: 369

Comment:
**Batch status list still shows `task.slug`, not `task.title`**

The progress list during bulk creation still identifies tasks by their slug (line 369: `{task.slug}`), while the workspace is now named after their title. This creates a slight UX mismatch — the user sees the slug in the progress list but the workspace opens with the title as its name. Depending on intent, you may want to show `task.title` here (or `task.title ?? task.slug`) so the progress list matches what the user will see in the sidebar.

```suggestion
								<span className="truncate">{task.title || task.slug}</span>
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "fix(desktop): use task title as workspac..." | Re-trigger Greptile

{
projectId,
name: task.slug,
name: task.title,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Possible workspace collision on same-title tasks

createWorkspace.mutateAsyncWithPendingSetup deduplicates by projectId + name (evidenced by the result.wasExisting check). When name was task.slug, collisions were impossible because slugs are unique per project. Now that name is task.title, two tasks in the same project that share a title (e.g., both called "Fix auth middleware") will match the same workspace: the second open-in-workspace call will return wasExisting: true and launch a new agent session inside the first task's workspace instead of creating a fresh one.

If workspace deduplication is also expected to key on branchName, this may be safe, but the code path for result.wasExisting only re-runs launchAgentSession — it does not verify that the found workspace's branch matches the current task's branch.

Consider appending the slug to keep uniqueness while still showing a human-friendly name, e.g.:

name: task.title ? `${task.title} (${task.slug})` : task.slug,

or guarantee uniqueness by checking whether the backend deduplication key includes branchName.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/components/PropertiesSidebar/components/OpenInWorkspace/OpenInWorkspace.tsx
Line: 124

Comment:
**Possible workspace collision on same-title tasks**

`createWorkspace.mutateAsyncWithPendingSetup` deduplicates by `projectId` + `name` (evidenced by the `result.wasExisting` check). When `name` was `task.slug`, collisions were impossible because slugs are unique per project. Now that `name` is `task.title`, two tasks in the same project that share a title (e.g., both called `"Fix auth middleware"`) will match the same workspace: the second open-in-workspace call will return `wasExisting: true` and launch a new agent session inside the first task's workspace instead of creating a fresh one.

If workspace deduplication is also expected to key on `branchName`, this may be safe, but the code path for `result.wasExisting` only re-runs `launchAgentSession` — it does not verify that the found workspace's branch matches the current task's branch.

Consider appending the slug to keep uniqueness while still showing a human-friendly name, e.g.:

```ts
name: task.title ? `${task.title} (${task.slug})` : task.slug,
```

or guarantee uniqueness by checking whether the backend deduplication key includes `branchName`.

How can I resolve this? If you propose a fix, please make it concise.

{
projectId: effectiveProjectId,
name: task.slug,
name: task.title,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Same workspace-collision risk as in OpenInWorkspace

The same deduplication concern applies here. In the bulk path this is especially impactful: if a user bulk-selects multiple tasks that happen to have the same title, only the first one creates a new workspace; all subsequent ones will hit wasExisting: true and inject their agent launch request into the same pre-existing workspace, rather than each getting their own isolated environment.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/components/TasksView/components/TasksTopBar/components/RunInWorkspacePopover/RunInWorkspacePopover.tsx
Line: 177

Comment:
**Same workspace-collision risk as in `OpenInWorkspace`**

The same deduplication concern applies here. In the bulk path this is especially impactful: if a user bulk-selects multiple tasks that happen to have the same title, only the first one creates a new workspace; all subsequent ones will hit `wasExisting: true` and inject their agent launch request into the same pre-existing workspace, rather than each getting their own isolated environment.

How can I resolve this? If you propose a fix, please make it concise.

{
projectId,
name: task.slug,
name: task.title,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Missing guard for empty/undefined task.title

task.title is typed as part of TaskWithStatus but tasks can exist in a draft/untitled state (e.g., a task created without a title yet). Passing an empty string or undefined as name to createWorkspace may be rejected by the backend or silently create a workspace with a blank name. The previous task.slug was always a non-empty structured identifier.

Consider adding a fallback:

Suggested change
name: task.title,
name: task.title || task.slug,
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/components/PropertiesSidebar/components/OpenInWorkspace/OpenInWorkspace.tsx
Line: 124

Comment:
**Missing guard for empty/undefined `task.title`**

`task.title` is typed as part of `TaskWithStatus` but tasks can exist in a draft/untitled state (e.g., a task created without a title yet). Passing an empty string or `undefined` as `name` to `createWorkspace` may be rejected by the backend or silently create a workspace with a blank name. The previous `task.slug` was always a non-empty structured identifier.

Consider adding a fallback:

```suggestion
					name: task.title || task.slug,
```

How can I resolve this? If you propose a fix, please make it concise.

MocA-Love added a commit to MocA-Love/superset that referenced this pull request Apr 24, 2026
upstream 取り込み PR #11: use task title as workspace name (superset-sh#3678)
@Kitenite Kitenite deleted the saddlepaddle/linear-integration-techniques-and-methods branch May 6, 2026 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant