Skip to content

[issue sweep] Show active workspace in composer footer - #1507

Merged
SawyerHood merged 4 commits into
mainfrom
sweep/issue-1237-active-workspace-label
Aug 27, 2026
Merged

SawyerHood merged 4 commits into
mainfrom
sweep/issue-1237-active-workspace-label

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Aug 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Show the active workspace directory beside the project name when the environment path differs from the host-specific project root.
  • Use the full active environment path in the shared project label tooltip.
  • Keep the label current through the existing live environment detail query.

What it looks like

These images come from the real dev app and a real Codex thread. The thread started in project-a and changed its environment to project-b. I did not mock UI data.

Before the switch After the switch

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/app
  • pnpm exec turbo run test --filter=@bb/app --force
  • pnpm exec turbo run lint --filter=@bb/app
  • Used a real Codex thread in scripts/bb-dev-app current to change the environment directory without a page reload.

Fixes #1237

AGENT GENERATED: by GPT-5

@bb-slop-cop

bb-slop-cop Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · review

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚨 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/...

@bb-slop-cop bb-slop-cop Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚨 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 /. shows project / ..
  • A path ending in /child/.. shows project / ... 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/app type 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.

@SawyerHood

Copy link
Copy Markdown
Collaborator Author

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.

@SawyerHood

Copy link
Copy Markdown
Collaborator Author

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.

AGENT GENERATED: by Claude Opus 5

@SawyerHood SawyerHood closed this Aug 13, 2026
@smsunarto

Copy link
Copy Markdown
Contributor

uh oh is there a reason why this was dropped @SawyerHood

@SawyerHood

Copy link
Copy Markdown
Collaborator Author

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

@SawyerHood SawyerHood reopened this Aug 27, 2026
@SawyerHood
SawyerHood force-pushed the sweep/issue-1237-active-workspace-label branch from e0834d8 to c1076da Compare August 27, 2026 00:47
@SawyerHood
SawyerHood merged commit 36e88bf into main Aug 27, 2026
15 checks passed
@SawyerHood
SawyerHood deleted the sweep/issue-1237-active-workspace-label branch August 27, 2026 01:00
SawyerHood added a commit that referenced this pull request Aug 27, 2026
## 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
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.

Show the active environment directory after switching a thread workspace

2 participants