fix(webapp): say why the buttons are dead (BEA-190) - #200
Open
ssowonny wants to merge 1 commit into
Open
Conversation
The hub knew an account was restricted, changed its UI to match, and never said so. A read-only member got the identical "install the CLI and start syncing" prompt a writer gets, and found out the hub refuses pushes only after installing, running `bdrive init` and editing a file. On Settings the Save button and the whole Danger zone simply vanished — absence reads as a broken page, not as policy. - Installation page: a `perm < write` account gets a note above the paste prompt saying it will receive the team's changes and that its own edits stay local. Not "don't install": pull-only sync is supported and the page is legitimately useful to them. - Settings: one sentence per gated card, derived from `mayEdit` rather than from `perm`. That covers the case the report missed — a plain write member is short of *admin*, saw no Read-only chip (it is gated on `< write`) and no buttons either, so they got no explanation at all. - Save and Danger zone are rendered disabled instead of removed. The server still enforces both; this is only what the page says about it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
TL;DR
bdrive initand editing a file.< write), no buttons (gated on< admin). Fixed by keying the copy offmayEdit, not offperm.The hole
Three levels, two thresholds, one page. Nobody in the middle column was told anything.
readwrite(not admin)admin--text-faint)< writeThat middle column is why the new copy is derived from
mayEditrather than fromperm. Deriving it frompermwould have shipped the exact bug again for write members.Installation page
ConnectGuidealready receives the wholeProjectand never consultedperm. It does now, and aperm < writeaccount gets agd-noteabove the paste prompt — before anything is copied.The copy deliberately does not say "don't install". A read-only member genuinely can sync down (
GET /store/list,GET /store/objectarePermRead) and cannot push (POST /store/sign,PUT /store/objectarePermWrite), so pull-only is a supported use of this page. What they're told is both halves: you'll receive the team's changes, your own edits stay on this device.The
project.perm !== undefinedguard matters —Project.permis optional in the TS type even though the hub always populates it, andatLeast(undefined, "write")isfalse. Without the guard a payload missingpermwould warn every user, which is worse than warning none.Settings
Save and the Danger zone are rendered unconditionally with
disabled={!mayEdit}, and each gated card states the reason once. The three General fields were alreadydisabled; only the two controls that vanished changed.The
.ps-chipstays — it's a fine at-a-glance badge, it just can't be the only signal. It shipped in69e7231(2026-07-27), well before the scan, so the "neither page contains the words read only" half of the report was wrong as filed; what was right is that it's 11px--text-faintand two reviewers missed it.read-only member — before, the page rendered normally with its buttons quietly missing:
write member — the case the report didn't see. Before: no chip, no buttons, no explanation anywhere on the page.
What I'm accepting
Showing a disabled Danger zone to every project member is more chrome for more people. That's the trade the issue's acceptance criteria asked for ("no control silently absent"), and the stated fallback was one explicit statement covering both removed controls instead. I picked disabled-with-reason and applied it to both cards rather than mixing. If that reads as clutter, the swap is one
{mayEdit && …}away — say so and I'll flip both.What was run
go test ./...— pass.go vet ./...— clean.npm run buildininternal/webapp/frontend,internal/webapp/staticcommitted;./check-dist.shclean.npm run e2e— 207 passed, 1 skipped, 0 failed.1280wide against the seeded e2e hub. Disabled controls verified at computedopacity: 0.5,pointer-events: none.Two components, one stylesheet rule, one bundle rebuild. No new component, seam or data flow, so
architecture/webapp-frontend.mdis unchanged and there's no "Architecture changes" section.Closes BEA-190.
Build session
(this machine only)