Skip to content

upstream 取り込み PR #11: use task title as workspace name (#3678)#414

Merged
MocA-Love merged 1 commit intomainfrom
upstream/batch-11-task-title
Apr 24, 2026
Merged

upstream 取り込み PR #11: use task title as workspace name (#3678)#414
MocA-Love merged 1 commit intomainfrom
upstream/batch-11-task-title

Conversation

@MocA-Love
Copy link
Copy Markdown
Owner

@MocA-Love MocA-Love commented Apr 24, 2026

Summary

upstream #3678 を軽量取り込み。1 commit / 2 files / +2 / -2 の最小変更。

取り込み内容

変更詳細

task を workspace として開く際の workspace name を、Linear/GitHub 識別子 (例: "SUPER-172") から人間向けタイトルに切り替え。branch 名は deriveBranchName({slug, title}) のまま維持され、Linear/GitHub 識別子はトレーサビリティのため branch 側で保たれる。

変更ファイル:

  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/components/PropertiesSidebar/components/OpenInWorkspace/OpenInWorkspace.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/$taskId/components/RunInWorkspacePopover/RunInWorkspacePopover.tsx

コンフリクト解消

なし (clean cherry-pick)。

Fork 固有機能ヘルスチェック

本 PR は task UI の naming のみ変更。fork 固有機能 (19 procedure, TERMINAL_OPTIONS, SUPERSET_WORKSPACE_NAME, dmg.size, 依存, TiptapPromptEditor, v1MigrationState) には触れず、影響なし。

Test plan

  • bun install 正常完了
  • bun run typecheck グリーン (27/27)
  • bun run lint グリーン
  • task を workspace として開くと workspace 名がタイトル表記になる
  • branch 名は従来通り slug/title 形式

残 upstream 取り込み

本 PR で計画 scope は実質完了。残る真の未取り込みは #3697 split workspace-creation router の 1 件のみ。これは fork 独自拡張 (baseBranchSource / PR checkout / fork note) と全面衝突する大規模 refactor で、別 refactor PR として別途対応予定。

Summary by CodeRabbit

リリースノート

  • バグ修正
    • ワークスペース作成時のネーミングロジックを改善しました。ワークスペース作成時に、より意味のあるタスクタイトルをワークスペース名として使用するようになりました。

…uperset-sh#3678)

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

coderabbitai Bot commented Apr 24, 2026

📝 Walkthrough

Walkthrough

ワークスペース作成フローにおいて、2つのコンポーネントで task.slug から task.title へ切り替える変更が加えられました。createWorkspace.mutateAsyncWithPendingSetup 呼び出し時にワークスペースの name フィールドとして使用される値が変更されます。その他の処理ロジックに変更はありません。

Changes

Cohort / File(s) Summary
ワークスペース作成時のタイトル参照
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
ワークスペース名の取得元を task.slug から task.title に統一。両コンポーネントで同じ変更が適用されています。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 ふわふわのタスクたち、
スラッグからタイトルへ、
ワークスペースの名前も優雅に、
二つのコンポーネントで、
統一の輝き!✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed プルリクエストのタイトルは、変更内容(task を開く際に workspace 名を slug ではなく title から設定)を明確に説明しており、主要な変更を適切に要約しています。
Description check ✅ Passed プルリクエストの説明は、取り込み内容、変更詳細、影響範囲、テスト計画など包括的に記載されており、テンプレートの重要なセクションをカバーしています。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 upstream/batch-11-task-title

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/`$taskId/components/PropertiesSidebar/components/OpenInWorkspace/OpenInWorkspace.tsx:
- Line 124: task.title is used directly as the workspace name when calling
createWorkspace.mutateAsyncWithPendingSetup; add input validation/sanitization
before passing name: ensure task.title is not empty or whitespace-only, trim it,
enforce a reasonable max length, and remove or replace
filesystem/URL/UI-problematic characters (e.g. '/', '\', newlines) or fall back
to task.slug if sanitized title is invalid; keep deriveBranchName({ slug, title
}) behavior and wasExisting/worktreeId logic unchanged, and ensure the sanitized
value is what you pass to createWorkspace.mutateAsyncWithPendingSetup as the
name parameter.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1b7c5884-0b44-4c1a-a05c-178eb1c3851f

📥 Commits

Reviewing files that changed from the base of the PR and between 88024d3 and 5611677.

📒 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

{
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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# useCreateWorkspace と mutateAsyncWithPendingSetup の実装を確認し、
# name のバリデーション/サニタイズ、および wasExisting 判定のキーを特定する
fd -t f 'workspaces' apps/desktop/src/renderer/react-query
rg -nP -C5 'mutateAsyncWithPendingSetup|wasExisting' --type=ts --type=tsx
rg -nP -C3 '\bname\b.*(trim|slice|sanitize|length)' --type=ts --type=tsx -g '!**/node_modules/**'

Repository: MocA-Love/superset

Length of output: 453


🏁 Script executed:

#!/bin/bash
# Find useCreateWorkspace hook and related mutations
echo "=== Finding workspace-related hooks ==="
find apps/desktop/src/renderer/react-query/workspaces -type f -name "*.ts" -o -name "*.tsx" | head -20

echo -e "\n=== Searching for useCreateWorkspace ==="
rg 'useCreateWorkspace|mutateAsyncWithPendingSetup' -t ts -t tsx apps/desktop/src/renderer

echo -e "\n=== Searching for wasExisting ==="
rg 'wasExisting' -t ts -t tsx apps/desktop/src/renderer -C 3

echo -e "\n=== Checking OpenInWorkspace.tsx ==="
find apps/desktop/src/renderer -name 'OpenInWorkspace.tsx' -exec head -150 {} \;

Repository: MocA-Love/superset

Length of output: 6626


🏁 Script executed:

#!/bin/bash
echo "=== Reading useCreateWorkspace.ts ==="
wc -l apps/desktop/src/renderer/react-query/workspaces/useCreateWorkspace.ts

echo -e "\n=== Full content ==="
cat -n apps/desktop/src/renderer/react-query/workspaces/useCreateWorkspace.ts

echo -e "\n=== Searching for workspace creation/validation in src/lib ==="
find apps/desktop/src/lib -type f \( -name "*.ts" -o -name "*.tsx" \) | xargs grep -l "wasExisting\|workspace" | head -10

Repository: MocA-Love/superset

Length of output: 6812


🏁 Script executed:

#!/bin/bash
echo "=== Finding workspaces tRPC router ==="
find apps/desktop/src/lib/trpc -type f -name "*workspace*"

echo -e "\n=== Searching for workspaces router directory ==="
ls -la apps/desktop/src/lib/trpc/routers/ | grep -i workspace

echo -e "\n=== Check main index for workspaces ==="
grep -n "workspaces" apps/desktop/src/lib/trpc/index.ts

Repository: MocA-Love/superset

Length of output: 1039


🏁 Script executed:

#!/bin/bash
echo "=== Reading workspaces.ts ==="
wc -l apps/desktop/src/lib/trpc/routers/workspaces/workspaces.ts

echo -e "\n=== First 200 lines of workspaces.ts ==="
head -200 apps/desktop/src/lib/trpc/routers/workspaces/workspaces.ts

echo -e "\n=== Reading workspace-creation.ts ==="
wc -l apps/desktop/src/lib/trpc/routers/workspaces/utils/workspace-creation.ts
cat -n apps/desktop/src/lib/trpc/routers/workspaces/utils/workspace-creation.ts

Repository: MocA-Love/superset

Length of output: 15863


🏁 Script executed:

#!/bin/bash
echo "=== Reading create procedures ==="
wc -l apps/desktop/src/lib/trpc/routers/workspaces/procedures/create.ts
head -300 apps/desktop/src/lib/trpc/routers/workspaces/procedures/create.ts

echo -e "\n=== Reading workspace-auto-rename.ts ==="
cat -n apps/desktop/src/lib/trpc/routers/workspaces/utils/workspace-auto-rename.ts

Repository: MocA-Love/superset

Length of output: 9201


🏁 Script executed:

#!/bin/bash
echo "=== Checking for name validation in workspace schema/types ==="
find packages/db/src -type f -name "*.ts" | xargs grep -l "workspace" | head -5

echo -e "\n=== Checking workspace table schema ==="
rg "export const workspaces|workspace.*schema" packages/db/src -t ts -A 10 | head -50

Repository: MocA-Love/superset

Length of output: 1760


task.title をワークスペース名として使用する際の検証を確認してください。

task.slug(例: SUPER-172)から task.title への変更により、以下の観点で考慮が必要です:

  • task.title が空文字や空白のみの場合のハンドリング
  • 非常に長いタイトルやファイルシステム/UI で問題となる文字(/, \, 改行など)の検証またはサニタイズ

createWorkspace.mutateAsyncWithPendingSetup の実装を確認したところ、name パラメータは検証なくそのままデータベースに挿入されています。現在、テキスト長の制限や特殊文字の事前チェックがないため、入力側での適切なサニタイズまたはバリデーションレイヤーの追加を検討してください。

なお、wasExisting 判定は worktreeId に基づいているため、タイトルの一意性が問題になることはありません。branchName は引き続き deriveBranchName({ slug, title }) で識別子を含むため、追跡性は保たれています。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/tasks/`$taskId/components/PropertiesSidebar/components/OpenInWorkspace/OpenInWorkspace.tsx
at line 124, task.title is used directly as the workspace name when calling
createWorkspace.mutateAsyncWithPendingSetup; add input validation/sanitization
before passing name: ensure task.title is not empty or whitespace-only, trim it,
enforce a reasonable max length, and remove or replace
filesystem/URL/UI-problematic characters (e.g. '/', '\', newlines) or fall back
to task.slug if sanitized title is invalid; keep deriveBranchName({ slug, title
}) behavior and wasExisting/worktreeId logic unchanged, and ensure the sanitized
value is what you pass to createWorkspace.mutateAsyncWithPendingSetup as the
name parameter.

@MocA-Love MocA-Love merged commit 5683e2c into main Apr 24, 2026
6 checks passed
@github-actions
Copy link
Copy Markdown

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

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.

2 participants