Skip to content

Clean up workspace settings and stabilize Serena worktree setup#884

Open
johnml1135 wants to merge 2 commits into
mainfrom
fix_workspaces_and_serena
Open

Clean up workspace settings and stabilize Serena worktree setup#884
johnml1135 wants to merge 2 commits into
mainfrom
fix_workspaces_and_serena

Conversation

@johnml1135
Copy link
Copy Markdown
Contributor

@johnml1135 johnml1135 commented May 13, 2026

Summary

  • hide the visible VS Code terminal popup for the Serena setup task
  • keep the shared .serena/project.yml complete and document the current Serena behavior around project_name
  • fix Build/Agent/Setup-Serena.ps1 so it reports the configured project name correctly
  • auto-create an ignored .serena/project.local.yml for worktrees so Serena can use per-worktree names without rewriting shared config
  • add focused coverage for the worktree-local Serena override flow

Testing

  • .\scripts\tests\Test-Setup-WorktreeColor.ps1
  • Setup: Serena MCP

This change is Reviewable

Copilot AI review requested due to automatic review settings May 13, 2026 20:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR stabilizes Serena + worktree setup by rotating VS Code worktree color assignments, introducing per-worktree Serena project_name overrides, and reducing workspace/task noise.

Changes:

  • Rotate worktree color selection and persist last-used palette index in the repo’s Git common dir.
  • Auto-create .serena/project.local.yml in worktrees to keep per-worktree Serena names without rewriting shared config.
  • Add a focused PowerShell test covering worktree color rotation + Serena local override behavior, and update docs/tasks accordingly.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/tests/Test-Setup-WorktreeColor.ps1 Adds a regression test for worktree color rotation and .serena/project.local.yml creation/retention.
scripts/Setup-WorktreeColor.ps1 Implements rotating color assignment with persisted state and creates worktree-local Serena override config.
Docs/mcp.md Documents Serena’s project_name rewrite behavior and recommends project.local.yml overrides per worktree.
Build/Agent/Setup-Serena.ps1 Fixes regex to detect project_name anywhere in the YAML (multiline match).
.vscode/tasks.json Tweaks task detail text and hides the Serena setup task terminal reveal.
.serena/project.yml Keeps shared config “complete” (including project_name) and refreshes/comment-cleans config guidance.

Comment on lines +564 to +571
function Write-WorktreeColorState([string]$mainRepoRoot, [int]$colorIndex) {
$statePath = Get-WorktreeColorStatePath $mainRepoRoot
$state = [pscustomobject]@{
lastAssignedColorIndex = $colorIndex
}

$state | ConvertTo-Json -Depth 5 | Set-Content -LiteralPath $statePath -Encoding UTF8
}
Comment on lines +98 to +99
$alphaSerenaLocal = Join-Path $alphaDir ".serena\project.local.yml"
$betaSerenaLocal = Join-Path $betaDir ".serena\project.local.yml"
Comment thread .serena/project.yml
line_ending:

# list of regex patterns which, when matched, mark a memory entry as read-only.
# list of regex patterns which, when matched, mark a memory entry as readonly.
@github-actions
Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   12m 15s ⏱️ +45s
4 205 tests ±0  4 134 ✅ ±0  71 💤 ±0  0 ❌ ±0 
4 214 runs  ±0  4 143 ✅ ±0  71 💤 ±0  0 ❌ ±0 

Results for commit 2c41b96. ± Comparison against base commit 10d71d1.

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