Repository navigation
Conversation
|
👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review. When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically. |
Design Review (Fable 5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Description at this head contradicts the diff — Move-to-folder is declared deferred to #10911 yet this revision gates it, and the "known open items" are already fixed. WatchThe description (rewritten at [DESIGN-REVIEWED] 464c7be |
UX Review (Fable 5, fork) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS No blind reader has cold-read the offline dimming, reason row, or refusal notice — comprehension is unverified in this fork lane, capping at CONCERNS. Watch
[UX-REVIEWED] 464c7be |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsFINDING -- website/src/components/FolderMoveSubmenu.tsx:32 -- |
Opus 5 Review (fork) — ✅ no blocking findingsReviewed Review detailsOne advisory finding: FINDING — website/src/pages/ChatSidebar.tsx:7127 — the new [OPUS-REVIEWED] 464c7be |
First Principles Review (Fable 5, fork) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The description states the opposite of the diff: "FolderMoveSubmenu.tsx is not in this diff" and the row "stays ungated" — the diff gates that exact row. Not justified as shipped
What this change shipsInventory (10 items) — 7 justifiedIntent: FIX — stop offline sidebar folder/create controls from taking dead clicks and raising a false "Folder update failed".
[FIRST-PRINCIPLES-REVIEWED] 464c7be |
b1006cd to
add7f10
Compare
add7f10 to
219ad8a
Compare
219ad8a to
9ff95fb
Compare
68ca6d2 to
f495f27
Compare
f495f27 to
51d1fcf
Compare
51d1fcf to
649a5b7
Compare
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
|
🤖 Kiro Crew [operator: chenmingwei23#de330d0c]: This PR has been inactive for 7+ days with failing CI. I've assessed the blockers and they appear resolvable — I'll push fixes directly to this branch as a co-author. Assessment: Substantive review lanes (GPT, Opus, Design, First Principles) all pass. Blockers are mechanical: (1) merge conflict against current main — rebase; (2) UX Readiness blocked because the PR description narrates code not in this diff (session-rename fix, tag popover, etc.) and pins screenshots to a stale SHA — rewrite the body to match the actual diff (offline folder/create-menu gating only) and re-attach frames at HEAD; (3) a11y nit: list-view Incognito/Temporary rows call If you'd prefer I don't touch this PR, add the |
…line Items in the folder and New-chat menus now dim, refuse at the sink and carry one reason row per menu; a folder rename refused offline claims no update failure.
|
PR triage (2026-10-05): REBASE + merge discussion Checked against
Recommendation: keep, rebase onto current |
|
Thank you @rnoack1 for this fix. Main has moved a lot since (ChatSidebar.tsx was split into chat-sidebar owners in #20524), so the change has been carried forward in #20749, which keeps your authorship on the commit, Fixes #20736, and is now green. Closing this one in favour of it; your branch is left in place. #10832 can build on the same offline primitive next. |
Problem / Motivation
With the gateway offline, the sidebar's folder menus and the New-chat caret menu stayed fully live. Every row looked clickable, a double-click on a folder name opened a rename editor, and picking a create row appeared to start a session. None of those writes could reach the gateway, so each gesture was a dead click that gave no reason — while the session rows beside them were already visibly dimmed and refusing.
A folder rename attempted offline was worse than silent: the notice read "Folder update failed", a failure claim for a request that was never sent, and it offered an Ask the agent hand-off into a composer whose Send is itself offline-disabled.
Why it matters
The sidebar taught two different rules on one surface. A user who learned that a dimmed session row means "not now" had no reason to read a full-weight Delete folder as unavailable, so the only way to discover it was to click it and watch nothing happen. Dimming is a promise that the undimmed rows beside it are usable; leaving these ungated made that promise false.
The false "Folder update failed" title is a correctness problem rather than a polish one: it reports a server rejection that did not occur, so a reader cannot distinguish "your change was refused" from "you are offline".
What changed (motivation → approach → change)
The rule, applied uniformly: gate the gateway write at its sink, and leave an affordance that only reaches cached state at full weight.
Entry guards, so no misleading editor opens:
onDoubleClickin both views (list and board/column), refusing with a gateway-offline notice instead of opening the editorRenameitem in both folder ⋯-menusSink refusals on the folder-menu writes —
Rename,New subfolder, the two ephemeral create rows,Folder settings,Hide when empty,Delete folder— and on all four New-chat caret rows (plain, autopilot, incognito, temporary). Each carriesopacity-40 text-muted,offlineProps(...)for the tooltip and accessible name, andonSelect+preventDefault.One row in those menus stays ungated, and it is a gap rather than a decision:
Move to folder.FolderMoveSubmenu.tsxis not in this diff and reads no connection flag at this base, so it renders at full weight beside its dimmed siblings — the precise inconsistency the section above argues against. It is gated in #10911, which owns that file; gating it from here would duplicate a component rather than a one-line primitive. Called out so a reviewer does not read this menu's dimming as complete.Refusals use
onSelect, neveronClick. Radix keys menu close ononSelect, so anonClickthat returns early suppresses the action but lets the menu close anyway — taking the reason row with it, which reads exactly like the action having happened.A standing reason row, appended last. A natively disabled row carries
data-[disabled]:pointer-events-none, so it fires no event and can never open its own tooltip — an explanation gated on activation cannot reach it by construction. Each gated menu therefore renders onerole="status"row from the newOfflineMenuReason. It is appended after the last item because the row mounts when the gateway drops, and anywhere above the items it would shift every row —Delete folderincluded — under a mid-aim pointer.The folder refusal no longer lies. A new
folderActionOfflineflag drops thefolder_update_failedtitle, withholds the Ask the agent hand-off (askAgent={connected}), and retires the notice on the disconnected→connected transition only — so a genuine rejection raised while connected still stays put. All three mutationonErrorhandlers clear the flag, so a real failure never inherits the offline presentation.Offline verbs are catalogue keys, not English literals.
utils.offline.gateway_offline_reconnectis localized but interpolates{{action}}, so passing'switch sessions'produced a half-English sentence — a ja reader got…switch sessionsするには再接続してください. Eight verbs (change_folder_settings,create_folders,create_sessions,delete_folders,hide_folders,rename_folders,resume_sessions,switch_sessions) are added underutils.offlinein 13 catalogues — the 12 locales plusen.manual.json, sinceutils.offlineis a manual namespace and absent from the codemod-generateden.json— following thesubmit_commentskey already there as precedent. Two existing raw literals ('switch sessions','resume sessions') are converted to lookups. Each locale supplies the grammatical form its own template demands: a nominalised noun phrase after Germanfür …, a bare infinitive after Spanishpara, a sa-hen stem before Japaneseするには. The reason row's own string,components.sessionActionsMenu.offline_reason, is added to the 12 locales and toen.json.utils/offline.ts's doc comment is corrected to require a catalogue lookup, since it previously showed a raw English verb as the example.One restyle: the history row's offline dim moves
opacity-50→opacity-40so "dimmed" reads as a single state across the sidebar.Scope and provenance
This is unit 3 of a 6-way split of this PR's original +4224-line change, which was 2.8× the 1500 added-line cap. The split was measured per path against the merge base, not estimated. Where each piece went:
useRenameSlot, the_title_epochserver guard)utils/actionFailure.ts)mainSibling sizes are deliberately not quoted here: those PRs have taken review feedback since the split and their counts move independently of this one.
Two
ErrorNotice.tsxprops here have no consumer in this diff, and that is deliberate.wrapActionhas one caller andclassNameonErrorNoticeMenuItemComponenthas none. The file is carried byte-identical from #10920, where both have their consumers, so the two units merge without a conflict. Trimming them here would make one unit of a split diverge from another purely to satisfy a per-unit consumer count.OfflineMenuReason.tsxis carried the same way. First Principles flagged both — the finding is accurate; this is the reason.Tests
7 new cases in
ChatSidebar.folderSettingsOffline.test.tsx, plus updates to five existing suites (ephemeralCreate,createMenu,boardFolderRename,folderEphemeralCreate, and theChatSidebarintegration suite).What they pin, rather than merely exercise:
aria-disabledand asserted to open no modal and issue no write — dimming without suppression is the exact failure this sweep exists to prevent.aria-disabledalone, with a connected control in the same file asserting the same row carries no dim — so the gate is proven not to be blanket.onSelectsuppression from anonClickearly return.createTestStore()models a disconnected dashboard, so any suite asserting a write reaches the server now seedsconnectedexplicitly rather than inheriting the default. That is what the five existing-suite updates are.Full frontend suite at this head: 2110 files, 33728 passed, 0 failed, with
tscand ESLint clean and the i18n gate at 19/19 checks pass (run withI18N_BASE_REFsupplied — without it four diff-scoped checks silently do not run and a clean result is not coverage).Manual verification
The offline folder menu was driven by hand in both views and in the New-chat caret menu: rows dim, the reason row renders last, a refused row leaves the menu open, and a folder double-click raises the title-less notice which clears on reconnect.
Known open items, deliberately not fixed in this revision — the push gate returns
DENY conflict_rebase_budget_spent(a review request has been churned past for 6.5 days and further shas do not move that), so these are reported rather than patched:offlineProps(connected, …create_sessions)with nolabelargument, while their board-view twins pass one — so those two rows announce only "gateway offline" and not"{label} disabled — gateway offline". Raised by the UX lane; verified atChatSidebar.tsx:6681-6682against the board twins at:6190-6191. Two-argument fix.text-mutedtwice (ChatSidebar.tsx:8757), a harmless artefact of theopacity-50→opacity-40edit.offlineVerbKeys.test.tsis not in this PR. That repo-wide scan gate fails here on verbs owned by the sibling units (ChatInput.tsx,SessionTabStrip.tsx), so it can only pass once the last of them lands and belongs to that unit. Until then the English-literal rule is enforced by review rather than by CI.Screenshots / video
One frame here shows this PR's own surface, and it is pinned to this HEAD (
9e81502f):Two surfaces this PR changes have no frame, and I am declaring that rather than implying coverage: the New-chat caret menu offline state, and the folder double-click refusal notice. The UX lane is correct to list both as gaps.
On the evidence mechanism — an unresolved policy question, not an oversight. Nine further frames sit committed under
temp-screenshots/offline-rename-gate/. They were captured for the original undivided change, so they show the sibling units' behaviour (session rename, session menu, tag popover, artifacts menu, the rejected-write notice) and this description no longer embeds them as evidence for code that is not here. Committing review media at all deviates from.gitignore:99-105, which says it is uploaded as a GitHub attachment and never committed — and the attach route is mechanically unavailable on this machine:ghis 2.96.0 and--attacharrived in 2.99. The Design and UX lanes BLOCK on attachments specifically, which no edit from here can satisfy. The committed files have been left byte-identical rather than deleted, because removing them would settle that open question by taking the disputed action. A maintainer withgh≥ 2.99 can attach and drop the files.The harness that regenerates these frames is unit 6 above, deferred because it imports symbols absent from
main. Note that nothing underwebsite/capture/is type-checked —tsconfig.app.jsonisinclude: ["src"]— so a green build does not cover it.Related Issues
createTestStore()'s default to a connected dashboard, fixing at the root what this PR fixes per fixtureconnected; deliberately out of scope herePattern harvest
Rule candidate:
review-promptPattern: a disabled affordance whose explanation is gated on an interaction the disabling itself suppresses
Dimming a control and suppressing its handler is only half a refusal; the half that reaches the user is the reason, and the usual place to put it — a
titleor tooltip on the row — is unreachable precisely because the row is disabled.data-[disabled]:pointer-events-noneon the menu primitive means a natively disabled row fires no event, so no hover, focus or click can ever open its own explanation. The failure is silent and reads as a broken click rather than as an unavailable action.What would catch the next one: when a review sees a control gated on connectivity, permission or feature flag, ask where the reason renders and what event has to fire for it to appear. If the answer is an event the gate itself suppresses, the explanation has to be standing — rendered as a sibling that does not depend on activation. The generalisation beyond offline gating is any
disabled+titlepair on a primitive that setspointer-events-none.Checklist
utils/offline.ts's verb contract corrected)