Clean up workspace settings and stabilize Serena worktree setup#884
Open
johnml1135 wants to merge 2 commits into
Open
Clean up workspace settings and stabilize Serena worktree setup#884johnml1135 wants to merge 2 commits into
johnml1135 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
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.ymlin 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" |
| 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 read‑only. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.serena/project.ymlcomplete and document the current Serena behavior aroundproject_nameBuild/Agent/Setup-Serena.ps1so it reports the configured project name correctly.serena/project.local.ymlfor worktrees so Serena can use per-worktree names without rewriting shared configTesting
.\scripts\tests\Test-Setup-WorktreeColor.ps1Setup: Serena MCPThis change is