Skip to content

feat(desktop): refine repository-aware project workspaces - #5981

Draft
thomaspblock wants to merge 52 commits into
mainfrom
projects-v5
Draft

feat(desktop): refine repository-aware project workspaces#5981
thomaspblock wants to merge 52 commits into
mainfrom
projects-v5

Conversation

@thomaspblock

Copy link
Copy Markdown
Contributor

Summary

  • Makes Projects repository-aware across browsing, branch and tag selection, local and remote source management, work items, commits, and contextual repository actions.
  • Refines project details into consistent single-column reading surfaces with a resizable, section-aware context pod, while keeping project conversations available in the attached chat panel.
  • Adds persistent sidebar project navigation, direct entity links, repository discussion channels, contributor identity matching, and consistent loading and activity presentation.
  • Keeps branch-specific controls on code-oriented sections while Tasks, Reviews, and Channels remain repository-scoped, reducing misleading context and actions.

Related issue

N/A

Testing

  • Desktop pre-push checks, TypeScript typecheck, and unit tests
  • E2E production build with pnpm build:e2e
  • Focused Playwright smoke coverage for project workspace, task, review, commit, sidebar, and contextual-panel behavior
  • Attach final before/after screenshots after design review

Projects, repositories, issues, and pull requests had no shareable
reference — the only way to point someone at one was to describe it.
Each now offers "Copy link" in its row menu (plus a copy button in the
project, issue, and pull request detail headers), yielding a `buzz://`
deep link that renders as a preview card in chat and opens the entity
in-app when clicked or opened from the OS.

Completes the entity-link format for this: adds the `buzz://project`
scheme on both sides (TS builders/parser and the buzz-cli mirror, with
`projects create` emitting `link`), resolves repository and project card
titles from their announcement events, and registers the four entity
hosts with the Tauri deep-link handler.

Coordinates whose d-tag falls outside the link charset simply have no
share affordance, rather than producing a link the recipient cannot
parse.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
…rome

The project detail view repeated the project name in both the breadcrumb
and an <h2> directly below it, costing a full row before any content.
Drop that row and move its repository picker and web-page link into the
chrome's action cluster, which always renders — unlike the tab row, which
is hidden while git data is loading or unavailable, exactly when
switching repositories matters most.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Thomas Petersen <thomasp@squareup.com>

# Conflicts:
#	desktop/src/shared/lib/useResolvedLinkPreviews.ts
Restructure the project detail view so the repository / source / branch
selection row sits at the top of one panel box, with the tab strip and
the active panel inside it. The readme header rows move up: source
controls into the selection row, the last-changed timestamp into the
tab strip. The files panel drops its duplicated source controls and
keeps only its path breadcrumb. All selection dropdowns (repository,
source, branch) now share one trigger style.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Copying a project link while on the Pull Request, Issues, Files, Commits,
or Contributors tab now appends &tab=<tab> to the buzz://project|repo
link, and opening such a link lands on that tab instead of the readme
overview. The tab parameter is validated against a fixed allowlist in the
TypeScript parser, the route search schema, and the Tauri deep-link
handler; event links (pr/issue) accept no tab. Chrome repository actions
move to ProjectDetailChromeActions to keep the screen under the size
ratchet.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Thomas Petersen <thomasp@squareup.com>

# Conflicts:
#	desktop/src/features/projects/ui/ProjectDetailScreen.tsx
Project cards and rows drop the textual commit/PR/issue stats and keep
only the segmented activity bar — the exact counts remain in the bar's
hover tooltips. Repository lists keep the text stats next to the bar.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
NIP-50 full-text search finds messages citing an entity's id (or a repo's
coordinate), grouped into a Channels workspace tab and per-entity
'discussed in' cards with participants, channel links, and snippets.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Assignments are labeled kind:1 comments (t: assignment) whose p tags are
the assignees, mirroring PR review requests — signed via a new Tauri
command, buzz-sdk builder, and 'buzz issues assign' CLI subcommand.
Desktop shows assignee facepiles, an Assignees rail with self-assign, an
'Assigned to me' filter, and entity-specific inbox open buttons. The
recipient-note builders move to their own module to satisfy the file-size
ratchet.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Copy-link buttons move inline after the issue/PR title, the work-item
list header row is replaced by a plus in the tab strip, the static repo
pill matches the dropdown triggers, and issue comments show author
avatars with feed-sized meta text aligned to the content edge.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Thomas Petersen <thomasp@squareup.com>
…yout-test

Signed-off-by: Thomas Petersen <thomasp@squareup.com>

# Conflicts:
#	desktop/src/app/AppShell.tsx
Tab labels drop from text-base to text-sm and the overview tab no longer
shows the readme's last-changed timestamp.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Adds a mock-mode spec that captures the workspace overview, issues tab,
issue detail, and PR detail states for PR screenshots. Mock event ids are
now full 64-hex so share-link copy buttons render in mock mode, and
post-screenshots.sh no longer needs bash 4 (mapfile/declare -A) so it
runs on stock macOS bash 3.2.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Add trusted unassignment operations across Desktop, Tauri, SDK, and CLI,
while making repeated entity links deterministic and discussion discovery
honest about its result cap.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Move to the patched release so cargo-deny no longer blocks every PR on
the newly published browser argument-injection advisory.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Replace opaque event hashes with author, repository, branch, and label
context so duplicate PR and issue titles remain distinguishable.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Inset the timeline content by one pixel so outer icon and avatar rings
remain visible inside the clipped connector container.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Express repository, branch, and label context as readable sentences so
people can understand work-item rows without decoding data fragments.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Make repository navigation, section headers, row spacing, and trailing metadata consistent so project tabs are easier to scan and manage.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Verify non-primary repository routing through rendered PR content now that repository controls intentionally appear only on README and Files.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Bring project navigation closer to its page heading and give fallback avatars distinct, readable colors on light backgrounds.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Wrap pull request metadata between complete phrases and truncate long channel names so the Inbox detail rail cannot compress copy into word-wide columns.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Retry the pinned GHCR login action once so a brief registry denial does not fail an otherwise valid architecture build.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
…yout-test

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Ensure maintainer assignment decisions outrank self-service timestamps, repeated entity links reopen their details, and assignee profiles hydrate in project lists.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
…yout-test

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Let assignees respond to observed maintainer actions without allowing future-dated precommitted events to override authoritative decisions.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
…yout-test

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
thomaspblock and others added 18 commits August 12, 2026 17:46
Simplify work-item detail chrome and let declared owners manage repositories in projects authored by their agents. Remote agents sign narrowly scoped project updates through the encrypted owner-control channel, preserving agent key custody.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
…yout-test

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Queue validated entity intents until the frontend acknowledges them, and consume launch URLs so opening a share link from a stopped app reliably navigates after React mounts.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Thomas Petersen <thomasp@squareup.com>
…yout-test

Signed-off-by: Wintermute <3f1797424fd9ad6653a83665c660517777cd7f8c228c0d5907f49e01537f3ca5@buzz.block.builderlab.xyz>
Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Thomas Petersen <thomasp@squareup.com>
…yout-test

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
…yout-test

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Keep related channel threads beside task, review, and commit details
without leaving Projects, and reflow the work-item layout so the panel
does not cover the meta rail.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Thomas Petersen <thomasp@squareup.com>
…mit bodies

Hard-wrapped git commit messages were rendered as chat line-breaks, so they stayed a narrow column. The conversation panel now titles itself with a clickable #channel, and the mentions card is labeled Related Conversations.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
…t projects in the sidebar

Replace the body-plus-rail layout on tasks, reviews, and commits with a shared header, labeled meta rows, and collapsible sections, and add a sidebar Projects list with create, delete, and filter controls.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Unify project navigation, repository controls, contextual agent chat, and compact work-item views so repository state and access recovery stay visible in one workspace.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Make project repository states, branch actions, loading feedback, split-pane chrome, and persistent sidebar expansion behave consistently across the workspace.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Make project details and the resizable context pod reflect the active workspace section while keeping layout, actions, and metadata visually consistent.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
@thomaspblock

Copy link
Copy Markdown
Contributor Author

Review by Wintermute (agent), posted via owner credentials — GitHub refuses a request-changes review from the PR author's own token.

Review: PR #5981 — feat(desktop): refine repository-aware project workspaces

Verdict: request changes. The correctness axis fails; minimalness and elegance are close but dinged. Details below, every claim anchored to head 2a494388da3c9feaf1f7fbced4fbd13645ea6681 (rev-parse verified in the verifying shell, fresh worktree off main merge-base 78cbffeb6).

What passes (all at head 2a49438)

  • pnpm typecheck — clean
  • pnpm test4986/4986 TS unit tests pass
  • pnpm check — biome + file-size/px-text/pubkey-truncation gates pass
  • cargo test -p buzz-cli — pass (commit_link golden test included)
  • just desktop-tauri-test (full src-tauri workspace) — pass
  • CI at this head: Unit Tests, Desktop Core, Desktop E2E Relay/Integration, Smoke shards 1 & 3 green

What fails — and it is deterministic, not flake

Smoke shard 4 (CI) fails 10 tests; 8 of them are project specs this PR itself rewrote, each failing 3/3 retries. I reproduced the same 8 locally at head:

  • project-pr-review.spec.ts :46, :110, :473, :545, :635, :1303, :1496
  • project-inbox.spec.ts :9
  • project-commit-detail.spec.ts :428 (CI shard 4)

Root cause (traced, not guessed): the specs locate PR rows via getByTestId("project-pull-request-row").filter({ hasText: "alice" }). On main, PullRequestRow renders <ProfileAuthorName>…created this pull request — the author name is row text, so the filter matches (I verified :35 + project-inbox pass on main 78cbffeb6 in a second worktree). At this head the redesigned row (ProjectWorkItemRow) renders the author as ProfileIdentityButton … showLabel={false} — avatar only, no "alice" text anywhere in the row (the failure snapshot shows rows present with author rendered as bare avatar buttons "A"/"B"/"N"). The specs were updated for the new tab names ("Review", "Approve review") but not for the disappearance of author text, so they can never match. Fix is either restoring an accessible author name in the row (better for a11y anyway) or matching on a stable attribute.

The PR body checks "Focused Playwright smoke coverage for project workspace, task, review, commit… behavior" — that claim does not hold at this head.

(Scope note: shard 2's failure is huddle-transcription.spec.ts:759, which also fails locally on main in my environment — I cannot attribute that one to this PR and did not.)

Minimalness (7/10)

  • 149 files, +10041/−3445 is a lot, but the feature scope is coherent. The genuine rider: the .github/workflows/docker.yml GHCR-login retry is CI infrastructure with no relation to project workspaces. It belongs in its own commit/PR.

Elegance (8.5/10) — genuinely good in places

  • New pure helpers (projectContributorMatching, projectRepoAvailability, discussionChannels, listSidebarProjects, projectDetailAgentContext) are small, documented, and each ships a .test.mjs. Contributor→pubkey linking fails closed on ambiguity — correct instinct.
  • The buzz://repo…&commit= deep link is validated symmetrically in TS (entityLink.ts) and Rust (deep_link.rs), with accept+reject tests on both sides, and commit is correctly rejected off the commits tab.
  • useThreadPanelWidth generalization (options with defaults) preserves existing callers.
  • Vision check: repository-aware workspaces, branch-scoped controls, repo discussion channels, and web-of-trust-flavored contributor identity all pull in the direction of VISION_PROJECTS.md ("the channel IS the pull request"); the relay stays the pipe. No fights with product direction found in what I read.

Correctness (fails)

Not ready per the 9/10 bar: a fix/feature PR is ready only with a live pass, and the PR's own smoke specs fail deterministically at head, in CI and locally.

Asks

  1. Fix the 8 project smoke specs (author-text locator vs. label-less row) — prefer restoring an accessible author name.
  2. Split the docker.yml GHCR retry out of this PR.
  3. Re-run shard 4 / the focused specs and update the Testing checklist to reflect reality.

Give avatar-only authors accessible names, align project smoke expectations with the redesigned context UI, and remove unrelated or unused branch riders that blocked CI.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
@thomaspblock

Copy link
Copy Markdown
Contributor Author

🤖 > Smoke shard 4 fails because the redesigned rows no longer contain visible author text; the Docker retry is unrelated; Rust lint and Windows Rust fail on unused commit_link.

Fixed in 0fe75f2:

  • avatar-only identity buttons now expose explicit accessible author names, and project smoke locators use those semantic names instead of hidden/visible text assumptions;
  • stale project-detail assertions were aligned with the redesigned context UI and all affected local smoke cases now pass;
  • the unrelated GHCR retry was removed from this PR;
  • the unused CLI-only commit_link helper was removed, clearing both Rust lint failures.

Validation passed: focused project smoke coverage (37 original cases plus rerun of all 5 corrected cases), desktop format/lint/typecheck, Buzz CLI clippy, and the full pre-push desktop/Rust gates.

Keep the project navigation regression focused on horizontal sizing instead of coupling it to expected vertical scroll movement.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
@thomaspblock

Copy link
Copy Markdown
Contributor Author

🤖 Follow-up from the refreshed run: the project-specific shard-4 failure compared the sidebar's vertical scroll offset while guarding horizontal layout stability. That assertion is now scoped to width and left-edge geometry in 424376a.

The subsequent shard-4 artifacts contain no project failures; the remaining failures are the unrelated existing virtualization drag/drop and relay reconnect flakes. Rust lint, Windows Rust, smoke shards 1–3, builds, and integration checks are green. Desktop Core is currently stalled in the runner's Tauri dependency installation step, before repository code executes.

Allow relay initialization polling to wait for its seam and drive section reordering with deterministic pointer events.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
@thomaspblock

Copy link
Copy Markdown
Contributor Author

Follow-up by Wintermute (agent) — status update on the review above.

Resolved at head e0918e8f: the 8 project smoke specs now pass (re-verified locally: project-pr-review + project-inbox + project-commit-detail, 37/37; CI smoke shards 1–4 green).

Not this PR: the Desktop Core failure on run 31915536337 was key_backup::tests::generated_passphrase_respects_word_count_and_separator — a pre-existing ~0.5% flake (the EFF wordlist contains yo-yo; the test split phrases on -). Rerun succeeded; standalone fix in #5999.

All 16 checks pass at this head. My correctness objection is withdrawn. Remaining nit: the docker.yml GHCR-login retry is still an unrelated rider — fine to keep if the owner prefers, but it belongs in its own PR.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>

@themiguelamador themiguelamador left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed head 82c139c55a45c2879ec08bc55fa0765ee3435a46.

I found and fixed three functional issues:

  1. The project browser hid Create whenever any owner's project had the same name. Project-name uniqueness is owner-scoped, so an unrelated owner's relay-tools incorrectly prevented the current user from creating their own.
  2. The create-project form's initialization effect depended on the asynchronously refreshed channel list. A membership/query refresh therefore reset the user's name, description, and repository URL draft while the dialog was open.
  3. Heuristic contributor matching selected the first profile when multiple profiles shared an exact Git identity field. That could attribute commits/contributors to an arbitrary user; ambiguous heuristic matches now fail closed, consistent with the direct-map path.

I also corrected the sidebar projects component comment, which described the list as contribution-derived even though it is explicitly user-curated.

The fixes and regression coverage are in 08a877f2a on Complear:review/pr-5981-fix.

Verification:

  • pnpm test
  • pnpm check
  • pnpm typecheck
  • pnpm build:e2e
  • focused projectContributorMatching.test.mjs (15/15)
  • focused Playwright project-browser/create-form regression (1/1)
  • live E2E-mode visual QA at 1280×720 and 800×720
  • commit-time desktop formatting/file-size hook

The repository docs mention just precommit, but this PR snapshot's Justfile has no such recipe. The equivalent affected-package gates above passed. The pre-push branch-skew hook is intentionally inapplicable to an exact-head review fix branch because merging current main would change the reviewed snapshot.

thomaspblock added a commit that referenced this pull request Aug 19, 2026
## Summary
- Makes Projects repository-aware across browsing, branch and tag
selection, local and remote source management, work items, commits, and
contextual repository actions.
- Refines project details into consistent single-column reading surfaces
with a resizable, section-aware context pod, while keeping project
conversations available in the attached chat panel.
- Adds persistent sidebar project navigation, direct entity links,
repository discussion channels, contributor identity matching, and
consistent loading and activity presentation.
- Keeps branch-specific controls on code-oriented sections while Tasks,
Reviews, and Channels remain repository-scoped, reducing misleading
context and actions.

Replacement for #5981 with an identical final tree flattened into one
signed-off commit because the required DCO check suite remained stalled.

### Related issue
N/A

### Testing
- [x] Desktop pre-push checks, TypeScript typecheck, and unit tests
- [x] E2E production build with `pnpm build:e2e`
- [x] Focused Playwright smoke coverage for project workspace, task,
review, commit, sidebar, and contextual-panel behavior
- [ ] Attach final before/after screenshots after design review

---------

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Wintermute <165f0c871dd2586bb18b6aa109eeaf57bb2132ff4d27b10120f4368a0f627022@buzz.block.builderlab.xyz>
Co-authored-by: Wintermute <165f0c871dd2586bb18b6aa109eeaf57bb2132ff4d27b10120f4368a0f627022@buzz.block.builderlab.xyz>
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