Repository navigation
[issue sweep] Show active workspace in composer footer - #1507
Conversation
|
🚨 SLOP COP 🚨 · I am SlopCop. I am reviewing this pull request for security, code quality, performance, architecture, and end-to-end behavior. |
| const normalizedEnvironmentPath = environmentPath | ||
| ? trimTrailingPathSeparators(environmentPath) | ||
| : undefined; | ||
| const environmentDirectoryName = normalizedEnvironmentPath |
There was a problem hiding this comment.
🚨 slopcop/review — Normalize dot path segments before you derive the workspace label.
The environment-directory tool accepts existing absolute paths such as /repo/. and /repo/child/... The host keeps that text unchanged. This code removes only trailing separators, so those valid paths display project / . or project / ... The comparison can also mark the project root as a different workspace. Please normalize both paths before the equality check and directory-name extraction. The existing normalizeAbsoluteFilePath helper already resolves these segments. Please add tests for /. and /child/...
There was a problem hiding this comment.
🚨 SLOP COP 🚨 · review
ELI5: The footer now shows which workspace the thread uses. This helps users avoid work in the wrong folder.
Finding
- P2: Dot path segments can produce the wrong workspace label. A path ending in
/.showsproject / .. - A path ending in
/child/..showsproject / ... It can also identify the project root as a different workspace. - Normalize both paths before comparison and name extraction. Add tests for both cases.
Architecture
The app already has normalizeAbsoluteFilePath. Reuse it instead of the new component-only path logic.
Checks
- I found no security issue.
- I found no material performance regression.
- The two changed test files passed all 29 tests.
- The
@bb/apptype check passed. - A browser test showed the workspace label and the full-path tooltip in a real worktree.
- All GitHub checks passed.
The main behavior works, but the dot-segment case needs a fix.
|
Addressed the Slop Cop P2 finding in 2eb0d08. The footer now uses the existing normalizeAbsoluteFilePath helper before path comparison and directory extraction. The regression test covers both /path/. and /child/.. cases. |
|
Closing without merging. This came out of the 13 Aug 2026 overnight issue sweep. Sawyer is closing the unmerged sweep pull requests rather than carrying them. The branch is left in place, so this can be reopened or cherry-picked. The review history, the measurements, and the answers to each Slop Cop finding stay on this pull request.
|
|
uh oh is there a reason why this was dropped @SawyerHood |
|
nah this is actually good. i just open so many prs that i lose track lol and had my agent close out stuff that was old and unmerged |
e0834d8 to
c1076da
Compare
## Human comments ## What was wrong Pull request #1507 added the active environment directory beside the project name. It produced a duplicate `bb / bb` footer label. ## What changed This change reverts pull request #1507. The composer footer now shows only the project name again. The change restores the prior project-name query and removes the added environment-path props. It does not change the host daemon protocol. The change also isolates an existing thread-mention retry mock. That mock caused a later app test to fail after the first CI run. ## How you verified - `pnpm exec turbo run typecheck --filter=@bb/app` - `pnpm exec turbo run lint --filter=@bb/app` - The targeted app tests did not start because the host returned `Unknown system error -122, write`. - GitHub CI runs the affected footer and thread-mention tests. Reverts #1507 > AGENT GENERATED
Summary
What it looks like
These images come from the real dev app and a real Codex thread. The thread started in
project-aand changed its environment toproject-b. I did not mock UI data.The tooltip shows the full active environment path.
The label truncates a long directory name without moving the other footer controls.
The screenshots live on the throwaway branch
screenshots/issue-1237. They do not add binary files to this pull request.Testing
pnpm exec turbo run typecheck --filter=@bb/apppnpm exec turbo run test --filter=@bb/app --forcepnpm exec turbo run lint --filter=@bb/appscripts/bb-dev-app currentto change the environment directory without a page reload.Fixes #1237