Skip to content

Implement G-33 - #32

Merged
ayyshim merged 24 commits into
mainfrom
canopy/implement-g-33
Nov 22, 2026
Merged

ayyshim merged 24 commits into
mainfrom
canopy/implement-g-33

Conversation

@ayyshim

@ayyshim ayyshim commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Handover: the 3D office in the app (G-34, from G-33)

1. What was asked

You asked for the 3D office prototype from G-33 to be built into the real Canopy app, showing live data from the board.

You chose the full prototype: a room for each workspace, the five agent states, the click card, the common area, alert sounds, side panels (goals, notes, jobs, computers, folders, hiring, chat), the "All rooms" overview and the space background. The YouTube music was dropped because its licence was unclear.

Later you reported that the Web app check failed on the pull request (#32). That is fixed (see "Since the last handover" below).

The plan is in the note "Plan: Implement G-33". Tommy did T-223, T-225, T-227 and T-231. Trevor did T-224 and T-226. I did T-230.

2. What changed and where

All the work is on the branch canopy/implement-g-33. It has 24 commits, including merges, and none has a co-author line. Only the web app (frontend/) changed. The server (hub/) did not.

The prototype's files were copied in, not merged. So the 67 MB browser profile (.prof/) from G-33 is not on this branch or in its history.

Since the last handover: the CI fix

  • Why the check failed: the Web app check stopped at its first step, installing packages. The CI log says pnpm 12.15.0 refused the lock file because it was "not up to date". The lock file (frontend/pnpm-lock.yaml) records the exact package versions. It had been rewritten with an older pnpm (10) while three was being added. That removed pnpm 12's section at the top and moved some unrelated packages up a version.
  • The fix: the lock file was rebuilt from main's copy with pnpm 12.15.0. Compared with main, it now only adds the 3D library (three 0.187.0), its type definitions and the 6 small packages those need. No code changed.
  • Tommy (T-231) and I (T-230) both made this fix at the same time. The two commits give the same file, so the branch has two lock file commits but one result.
  • This also settles item 2 from the last handover (who regenerates the lock file).

A new Office page

  • Each workspace now has an Office page at /w/{id}/office. An Office button sits in the board's top bar, next to Jobs.
  • The 3D code (Three.js 0.187.0) downloads only when someone opens this page. The board page is the same size as before.
  • The Office page adds about 171 KB (compressed). That is at the low end of the 170 to 220 KB estimate from G-33.

The 3D scene (frontend/src/components/office/)

  • The rooms, common area, space background, sounds and the logic that moves idle agents around are now TypeScript.
  • The W A S D / Q E camera works. Drawing pauses when the tab is hidden. A plain message shows if the browser can't do 3D.

Live data (frontend/src/lib/office/)

  • The board's existing status for each member becomes one of the five states (blobState() in lib/board/derive.ts). An agent with no session shows as Asleep with a "Not started" tag, unless it has an open request.
  • Each workspace is one room, with one desk per member and the managers first.
  • The workspace you have open updates instantly over its existing live connection. The other rooms reload every 30 seconds.
  • When someone is hired, they get a desk, and the room, hall and common area shift to make space.

Sounds

  • Sounds play only on real events: a new error, a new question or approval wait, and a goal that just finished. They don't play on first load or on ordinary state changes.
  • The Sounds button setting is remembered per browser.

Click card and side panels

  • The card shows name, role, state and current task. For the workspace you have open, it also has a Chat button and opens the task. "Show on the board" and "Open task" jump to the board. For other rooms, the card only has links.
  • Goals, Notes, Folders and People open the board's real panels, so everything in them works.
  • Chat opens the real chat window.
  • Hiring shows only to admins. It offers "Add a manager", "Add independent staff" and reviewing staff drafts, using the real dialogs.
  • Jobs and Computers are links to their existing pages, so they take you off the Office page.

Small board changes

  • A board link can now point at a member, and the board centres on them (deeplink.ts).

Tests

  • 138 frontend tests pass, including new ones for the state mapping, the office data, the sounds, the common-area logic and member links.
  • After the lock file fix, all the CI steps pass locally from a clean install: installing with the lock file locked, lint, the type check and the full app build.

3. How to check it

  1. CI. When this handover is approved, the branch is pushed to pull request Implement G-33 #32. Its Web app and Go checks should both be green. The pull request still shows the old failed run, because the fix isn't pushed yet.
  2. Build and test locally:
    cd frontend
    pnpm install --frozen-lockfile
    pnpm lint
    pnpm exec tsc --noEmit
    pnpm test
    NEXT_OUTPUT=export pnpm exec next build
    
    If the installed pnpm is older than 12, use npx pnpm@12.15.0 in place of pnpm.
  3. Run the app with make infra, make hub and make web, then open http://localhost:8000.
  4. Open a workspace that has staff and press Office in the top bar.
  5. Check these things:
    • The blobs match the board.
    • Starting a task changes a blob's state.
    • Clicking a blob opens its card.
    • Each panel opens.
    • The "All rooms" button works.
    • Hiring someone adds a desk.
    • The sound plays on an error and stays quiet after you mute.
  6. The screenshots and check notes are in T-227's outputs: the office at 1440×900, 1280×720 and phone width, the room after a hire, the card, the panels, the All rooms view and the no-3D message. The CI fix report is in T-230's outputs (ci-fix.md).

4. What isn't done or is risky

  • CI hasn't passed on GitHub yet. The fix passes locally, on a Mac with Node 23.9. CI runs on Linux with Node 26. The cause is clear from the CI log, so I expect it to pass, but it is only confirmed once the pushed run is green.
  • It has never been run against a real server. Every browser check used a fake server and a fake live connection. The real live updates, a real hire and the real role checks have not been seen working. No sound has been heard, because the browser used for the checks can't play sound.
  • The build machine's pnpm is too old. It has pnpm 10, which can't switch itself to the project's pnpm 12. That's how the lock file broke in the first place. Until it is updated, anyone working here should run npx pnpm@12.15.0.
  • Extra load on the server. Every open Office page reloads the full board of every workspace in the org every 30 seconds. This keeps going while the tab is hidden: drawing stops, but the reloads don't. That's fine with a few workspaces. With many workspaces or many people watching, it adds up.
  • Other rooms can be up to 30 seconds behind. Only the workspace you have open is instant.
  • Jobs and Computers are not panels. They open their full pages and leave the Office page.
  • Hiring visibility is only partly checked. It is confirmed hidden for staff, but not checked for someone who is only a manager.
  • Some parts stay empty. The goal whiteboard, the progress bars at desks and the paper piles show nothing, because the board data doesn't give them what they need. The prototype's made-up activity effects were not brought over.
  • The phone view is usable but rough. The room is cropped and the panel bar scrolls sideways.
  • Room colour comes from the manager's colour.
  • More code to look after. world.ts is about 880 lines and room.ts about 580.
  • The G-33 branch (canopy/work-on-n-74) still has the 67 MB browser profile. It should not be merged as it is.

5. What you need to decide

  1. Merge after CI is green, or try it with a real server first? My suggestion: wait for the green check, then have one person run it locally with real staff for ten minutes (start a task, hire someone, cause an error and listen) before merging.
  2. The build machine's pnpm. Update it to 12.15.0 so the lock file doesn't break again? My suggestion: yes. It's a one-time change on the machine, not in the code.
  3. The 30-second reload. Keep it for now, or add a small task to pause it while the tab is hidden? A lighter server request for the other rooms is a bigger option.
  4. Jobs and Computers. Keep them as links, or build them as panels inside the Office page?
  5. The empty whiteboard, progress bars and paper piles. Fill them from goal and task data (a new task), or remove them?
  6. The old G-33 branch. My suggestion: close it without merging. This branch already holds the real version, and closing it keeps the 67 MB profile out of main. If you want the prototype kept as a reference, copy only its folder without .prof/.

@ayyshim
ayyshim merged commit b5fc7f2 into main Nov 22, 2026
2 checks passed
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.

1 participant