Skip to content

fix(sidebar): gate session rename while the gateway is offline - #10920

Merged
iamwhatever merged 1 commit into
kirodotdev:mainfrom
rnoack1:fix/gate-session-rename-while-offline
Nov 6, 2026
Merged

iamwhatever merged 1 commit into
kirodotdev:mainfrom
rnoack1:fix/gate-session-rename-while-offline

Conversation

@rnoack1

@rnoack1 rnoack1 commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: refuse a session rename while the gateway is down, keep the typed draft, and say why.

Renaming a chat session while the gateway was down was accepted and then silently lost. The
editor closed, the row showed the new title optimistically, the PATCH failed, and the title
reverted with no explanation. The draft went with it, so the typed name was unrecoverable and
the only account available was that renaming "does not work sometimes".

Folder rename already refuses this way. ChatSidebar's renameCommit re-checks connected,
keeps the editor open, and shows a neutral notice. Session rename had no such gate on either
surface that owns it.

Why it matters

Evidence: seven committed frames under temp-screenshots/10920-offline-rename/, captioned in
Screenshots below.

A silent drop is worse than a refusal, and worse still once the user has typed. It costs the
work and gives no way to tell a dropped rename from one that never registered. It is reachable
any time the socket is down, which is also when a reader is least able to tell what happened.

Not a goal

  • Not a race fix, and no server change at all. An earlier cut added a server epoch guard,
    client generation counters, and a PATCH reply that returned the slot's live title. Upstream
    already publishes from the slot rather than from the request (apply_manual_title), so the
    broadcast half is solved on main. The reply half is out as well: no caller in this diff reads
    the reply body, so it was server scope riding along. src/kiro_crew/dashboard/chat_title.py
    is byte-identical to the base here.
    test_an_overtaken_rename_broadcasts_the_current_title asserts the redundant push on
    purpose and is untouched here.
  • No new rename plumbing. No useRenameSlot, no useRenamesInFlight, no wrapAction,
    no folderActionOffline. The gate lands inside the hosts that already own rename, so the
    per-slot refused-rename recovery on main keeps working unchanged.
  • Not a sweep. Only rename is gated. The other session-menu writes are out of scope.

What changed (motivation → approach → change)

The sidebar row (chat-sidebar/rename.ts, chat-sidebar/SessionRow.tsx).
useSessionRename reads useConnected() itself rather than taking it as a prop, the way
utils/offline.ts prescribes, so no caller can mount it ungated. Two sinks, not one:
onRenameStart refuses to open an editor whose commit could not reach the gateway, and
onRenameCommit re-checks before setRenamingSlot(null) for the case the open-time gate
cannot catch, a drop while the editor is already open. Returning early there is what keeps
the editor and the draft. The refusal is keyed by SLOT, so the notice renders under the row
it refused instead of under every row.

The header (chat/SessionTitleControl.tsx). The same pair, self-contained so none of its
three hosts (ChatPane, ChatTitleOverlay, MobileTopBar) change. TitleEditor calls
onCommit and then onClose unconditionally, so a refused commit sets a flag that
closeEditor reads: without it the editor would close on the same keystroke and take the
name with it. Escape still closes, because that is an explicit discard and runs no commit. The
flag is armed only while an editor is open, since Undo also commits with no editor to consume
it and the latch would then be swallowed by the next rename's close.

Keeping the editor means keeping its focus. Enter commits by BLURRING, so a refused commit
left focus on document.body, which this file's focus contract forbids. Both hosts restore it
from an effect, not the handler: the row remounts its textarea on that render. The effect is
keyed on a per-refusal COUNTER, because a second refused Enter leaves the refusal flag already
set and a flag-keyed effect would never re-run. And it only moves focus while nothing else
holds it, which is what tells Enter apart from a POINTER blur: a click has already focused its
own target by that frame, and pulling focus off it is the context change the same contract
forbids.

The phone's rename lives in the MENU, so the gate does too (SessionActionsMenu.tsx).
MobileTopBar renders that menu until Rename fires and only THEN mounts the title editor, so
the editor's own open-time gate never sees a phone rename at all, and on a phone the menu is
the only rename entry there is. The item now takes offlineMenuRow, the helper the folder
menu's gated rows already use: dimmed, the reason in its tooltip and accessible name, and
preventDefault on select so the menu stays open. A touch screen never shows that tooltip, so
the menu also paints the shared OfflineMenuReason row under Rename, as the folder and create
menus do. Every host that passes onRename gets both: the header and phone menus and the
sidebar row menus. Online neither adds anything.

An unchanged name is not held (chat-sidebar/rename.ts). Holding the editor open earns
nothing when the typed name equals the slot's own title: there is no draft at stake, and a
click-away could not then close it until the gateway returned. It closes instead, sending
nothing. The header already reached that outcome by returning on refused === title before
its own gate, so the two surfaces now agree.

The notice takes the next line, not the editor's width. Unshrinkable beside the editor, it
collapsed the phone-width editor to border and padding. The row now WRAPS and, while editing,
the notice takes basis-full. Wrapping alone is not enough: the editing cluster is
flex-1 min-w-0, which flex sizes at zero when it collects lines, so at any width where both
fit the notice still shared the line and squeezed the draft. The cluster keeps min-w-0,
which sessionTitleSqueeze requires. The read-only notice stays beside the title.

And the phone bar grows to hold that line (App.tsx, isMobile branch only). The offline
strip is absolute top-full INSIDE the header, so it starts at the header's bottom edge and
anything the header cannot fit lands under it. The shell grid pinned that track to a hard
42px around 66px of content; it is now minmax(42px,auto), identical while content fits.
Desktop and bottom-dock keep their fixed 42px.

The notice is neutral, not an error, and it is the SHARED row. No request was sent, so an
offline refusal is reported on OfflineReasonRow (components/OfflineMenuReason.tsx) rather
than the danger surface either host already has for a rejected PATCH. That component exists
for exactly this case, "a field whose typed value is being held", and the folder-name field
already uses it; both hosts here render through it, with no icon and no second copy of its
styling. It retires on the disconnected → connected transition only.

The row title keeps its tooltip. offlineProps is spread BEFORE title, deliberately:
it would otherwise replace the full-name tooltip, which is the only place a truncated session
name is shown in full, and the rename box that also shows it is exactly what is unreachable
offline. Only the aria-disabled affordance is taken there.

The notice clears the row's hover controls. That cluster is absolutely placed at the row's
centre, so a second line landed under it and the buttons covered the reason. The padding applies
under group-hover: only, so an unhovered row wraps no earlier.

utils.offline.rename_sessions is added to all 13 catalogues. Each value is composed
from that locale's OWN rename_folders and create_sessions rather than translated fresh,
and a checker asserts every codepoint of the new value appears in those two source strings.
en-XA is regenerated, not hand-edited.

Backwards compatibility

Online behaviour is unchanged on both surfaces: the gates are !connected branches. No server
file is touched, no API shape changes, no prop is removed. The only fixture change is THREE suites that modelled an offline dashboard
incidentally while testing rename-to-session pinning, menu focus restore and which menu
items render; they now use a
connected store, because with the gate in place an offline fixture cannot open the editor and
those cases would pass vacuously. The two suites that test the gate itself take the flag as a
parameter defaulting to connected, so their existing cases are unchanged.

Tests

  • SessionTitleControl.test.tsx: the header refuses to open offline and names the reason, the
    trigger is aria-disabled with the offline tooltip, and a drop mid-edit keeps the editor
    with its draft and sends nothing.
  • ChatSidebar.renameFailureRecovery.test.tsx: the same three for the sidebar row, including
    that the notice is role="status" and is keyed to the refused row.
  • SessionActionsMenu.renameOffline.test.tsx: the menu's Rename is dimmed offline, names the
    reason, paints it as visible text, and does not fire; it runs while connected with no reason
    row. Control: without the reason row the visible-text arm fails to find it. Control: restoring the plain onSelect
    reddens the refusal arm and leaves the online arm green.
  • offlineRenameReasonSource.test.ts: a source gate, in the idiom of sessionTitleSqueeze,
    requiring both hosts to render through OfflineReasonRow and forbidding a WifiOff in
    either. Control: both arms fail against the pre-swap hosts.
  • SessionTitleControl.test.tsx also covers an offline Undo leaving no keep-open latch, focus
    returning to the editor, focus returning again on a SECOND refused Enter, focus STAYING where
    a pointer put it, and the row wrapping rather than squeezing the editor.

Each has a negative control that reddens only its own case: removing the sidebar commit
re-check, dropping the header keep-open flag, ungating that flag from editing, re-keying the
restore on the refusal flag, dropping its idle-focus guard, and removing the wrap each fail
exactly one test. The focus and layout contracts are also measured in a real browser, which is
where they bite: re-keying the sidebar restore on its refusal value turns its repeat-Enter
assertion from TEXTAREA in-row into body.

Manual verification

tsc clean, ESLint clean at --max-warnings 0 over every changed file, and all 19
i18n-check arms pass with I18N_BASE_REF set, including the per-locale style arms that only
run diff-scoped. All four CI shards were run on this head and every remaining failure was
reproduced on a pristine worktree at the same merge base, by failing-test NAME and not merely
by count. npm run jscpd reports 0 clones, which the new harness must satisfy at 0%.

Harness mutation controls, each measured: the onRenameStart bail, the hover padding
(clear -> overlap 63px), either focus restore (-> body), and the wrap (236px -> 12px).
Two of its checks were VACUOUS and are fixed: "opened no editor" counted input where the row
editor is a textarea, and the focus checks sampled before a frame-deferred restore.

Screenshots / video

Seven frames are COMMITTED here under temp-screenshots/10920-offline-rename/, from
website/scripts/capture-10920-offline-rename.mjs against the real built SPA: 35 assertions,
0 failures.

Sidebar row refuses the rename while offline

Double-click offline: the title is aria-disabled and keeps its full-name tooltip, no editor
opens, the reason sits under the title. Hovered, so the cluster case above is visible.

A gateway drop mid-edit keeps the editor and its draft

The commit re-check: opened while connected, a name typed, the socket dropped, then Enter.
Editor and draft survive, nothing sent, and focus stays on the editor. The notice sits on its
own line under the editor, which the harness asserts once the layout has settled.

At phone width the editor keeps its width

360px, the same drop. The editor measures 236px with the notice showing, 12px without the
wrap, and the notice clears the global "Gateway offline" strip it overlapped by 16px while the
bar's track was pinned.

On a phone the Rename menu item is dimmed offline

360px, offline, the session menu open: Rename is dimmed and aria-disabled, the reason is
painted under it, and choosing it opens no editor. On a phone this menu is the only rename entry.

The row editor keeps its draft and its focus

The sidebar's half of the same path.

Header refuses the rename offline

The header host, same refusal.

Connected, the same double-click opens the editor

The control: connected, the gesture opens the editor and no notice renders.

Related Issues

None.

Pattern harvest

Rule candidate: review-prompt
Pattern: a precondition gate written on a control's own trigger, while another host opens the
same editor by setting its state directly, leaving the gate unreachable from that entry. Ask
which entry points can open it, not only the one in the diff. Measured here: the phone bar
renders a menu until Rename fires and only then mounts the editor with editing already true,
so the trigger's gate never saw a phone rename, and that menu is the phone's only rename entry.

Rule candidate: review-prompt
Pattern: a hand-written "held because the gateway is down" line beside a field when
OfflineReasonRow already exists for exactly that case. Two copies had already drifted to
different type sizes before the third was caught.

Gate a write at the sink that closes the editor, not only where the editor opens. An open-time
gate cannot see a connection that drops while someone is typing, and the close is what
destroys the draft, so the refusal has to return before it.

Checklist

  • One commit, rebased onto current main
  • No new dependencies
  • Tests added, each with a negative control
  • Unrelated failures attributed on a pristine base worktree

Contribution License Agreement

By submitting this pull request, I confirm that my contribution is made under the terms of the
project's license.

@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention labels Sep 15, 2026
@dwu96

dwu96 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

👋 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.

@rnoack1
rnoack1 marked this pull request as ready for review September 15, 2026 00:49
@rnoack1
rnoack1 requested review from a team and CrysisDeu September 15, 2026 00:49
@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ✅ PASS

UX-level review of d0047ca8c99a78b9f882836af4810a0f3549bc84 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. The seven committed frames show every control and state the diff adds, but this fork lane has no blind first-time read; pushing the branch to this repository runs one.

Notes

  • after-header-offline.png: the read-only header notice sits on a higher baseline than "Draft the release notes" and touches "Regenerate title" with no gap, so it looks like part of that button. Centre it on the title's line (self-center) and give it the cluster's gap-1, or put it on its own line as the editing branch already does with basis-full.
  • after-sidebar-offline.png: in the sidebar row, "Gateway offline — reconnect to rename sessions" wraps to three lines and reads as part of the preview "Noted." beneath it. A small bottom margin (mb-0.5) on the notice row would separate the reason from the preview.

[UX-REVIEWED] d0047ca

Description read

[DESCRIPTION-READ] 39a8c6f9a58c9edee408d4b473df5272a24dd678f6383862a4d5107d59c2f785

That sha256 names everything this verdict read: the PR description, plus the 10 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of d0047ca8c99a78b9f882836af4810a0f3549bc84 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the gate goes into the hooks that already own rename, it changes nothing while online, and the patch removes nothing.

Notes

  • The description says this PR changes SessionActionsMenu.tsx and adds utils.offline.rename_sessions to 13 catalogues. Neither is in the diff. Both are already on main: SessionActionsMenu.tsx:256 gates Rename with offlineMenuRow. Before merge, change the description's text to say those parts were already on main, so it matches the diff.
  • Moving connectedChannelLinks.ts out of SessionRow.tsx isn't covered by the stated goal. It's probably there to stay under the 2,000-line file cap; say that in the description, or put it in its own commit.
  • On phones, the shell's top row changes from a fixed 42px to minmax(42px,auto) (App.tsx). Any other header content that wraps can now grow that row too. That's easy to revert, but it applies to the whole phone layout, not just rename.

[DESIGN-REVIEWED] d0047ca

Description read

[DESCRIPTION-READ] 4236d391e48b43268c1735c0e69bac452eb3a72a13709032bad9f90a552c09fd

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed d0047ca8c99a78b9f882836af4810a0f3549bc84 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] d0047ca

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of d0047ca8c99a78b9f882836af4810a0f3549bc84 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. The two new gates sit where the draft is lost, in the two rename sinks that had none. The description's menu and catalogue paragraphs describe work the diff does not contain.

Notes

  • Item 8 — undeclared: the description never mentions moving connectedChannelLinks out of SessionRow.tsx. The move is required, though: base SessionRow.tsx is 1,981 lines, and the ~20 lines this PR adds would push it past AGENTS.md's 2,000-line cap.
  • Description framing: "The item now takes offlineMenuRow" and "utils.offline.rename_sessions is added to all 13 catalogues" do not match the diff. It touches neither SessionActionsMenu.tsx nor any locale file, and both already exist on base (website/src/components/SessionActionsMenu.tsx:256, website/src/i18n/locales/en.manual.json:10187). Subtraction: delete those two ## What changed paragraphs, or reword them as already on main. SessionActionsMenu.renameOffline.test.tsx only pins that existing behaviour.

What this change ships

Inventory (10 items) — 9 justified

Intent: stop a session rename typed while the gateway is down from being silently lost; keep the draft and say why. FIX.

  1. Double-clicking a sidebar row title while offline shows a neutral reason under that row instead of opening the editor — justified
  2. Committing a sidebar rename while offline keeps the editor and draft, and Enter returns focus to it — justified
  3. Clicking the header title while offline shows the reason instead of opening the editor — justified
  4. Committing a header rename while offline keeps the editor and draft; Escape still discards — justified
  5. While offline, the row title and header trigger carry an aria-disabled offline affordance — justified
  6. An unchanged name committed offline in the sidebar closes the editor without sending anything — justified
  7. The phone top bar grows to fit the wrapped notice line — justified
  8. connectedChannelLinks moved into its own module — undeclared; required by the line cap
  9. Seven screenshots and a capture script added — justified
  10. The feature-map Sessions row names the new helper module — justified

[FIRST-PRINCIPLES-REVIEWED] d0047ca

Description read

[DESCRIPTION-READ] 58be047e95a18408ce4fe28b378e9c8e52e26df038f63a9a34707aeeed87d7bf

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed d0047ca8c99a78b9f882836af4810a0f3549bc84 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] d0047ca

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 15, 2026
@NicholasRBowers NicholasRBowers added the needs-pr-triage PR scanner: awaiting automated triage label Sep 19, 2026
@chenmingwei23 chenmingwei23 added needs-author-decision PR blocked on author input and removed needs-pr-triage PR scanner: awaiting automated triage labels Sep 19, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor

[operator: chenmingwei23#de330d0c] This PR has been inactive for 7+ days. The remaining blockers need author or maintainer input:

  • Decide whether offline gating for duplicate, close, and regenerate, the wider notice layout changes, and the unused className prop belong in this rename-only PR. The review requests either removal or maintainer approval.
  • Attach rendered evidence for the offline sidebar and header, saving spinner, wrapped notice, and second-rename refusal.
  • Resolve the merge conflict.

After these choices and updates, the pipeline will re-assess this PR on its next cycle.

Copy link
Copy Markdown
Contributor

Triage (automated, read against origin/main @ a92dde1a): REBASE + MERGE-DISCUSSION. Not a duplicate, and main does not already have this.

Main still has the defect. On main, neither rename commit path checks connected. website/src/pages/chat-sidebar/rename.ts onRenameCommit and website/src/pages/chat/SessionTitleControl.tsx (~L200-L260) both dispatch sseSlotTitle and api.renameSlot with no offline gate. api_chat_slot_rename (chat_title.py ~L1465) still pushes the requested title with no epoch re-check. Main also has none of useRenameSlot, slotTitleGenerations, rename_sessions, could_not_rename_to or wrapAction. So this PR is not superseded.

Why it needs more than a conflict fix. The merge base f210fbb6 is about 2.8k commits behind main, and git merge-tree reports conflicts in 20 files. Most of the code this PR edits has also moved:

  • The sidebar rename plumbing moved out of ChatSidebar.tsx into pages/chat-sidebar/rename.ts in refactor(website): split ChatSidebar into composed chat-sidebar owners #15094 (the ChatSidebar split). Row Duplicate/Close are now delegated through [data-fork] / [data-close] in ChatSidebar.tsx (~L1896).
  • The ChatPage header editor is now pages/chat/SessionTitleControl.tsx, and split-view ChatPane uses the same control. Putting the gate there covers pane headers too, which the current ChatPage-only hunk does not. That control already carries the per-slot Header rename failure keeps the refused optimistic title (mirror of #10151) #10203 recovery (renameRecovery, confirmedGen). Replacing it with useRenameSlot needs to account for that recovery and its tests.
  • renameSlot now lives in website/src/api/client/chat.ts. api_chat_slot_rename now calls push_slot_title(..., full=False) followed by push_slot_patch(...), so the epoch guard has to cover both pushes.

Overlaps to coordinate. These complement this PR; none duplicates it:

Flags: I found no breaking change and no P0 bug. The PATCH response keeps its shape and now returns the live slot.title. The new props are all optional.

@rnoack1
rnoack1 force-pushed the fix/gate-session-rename-while-offline branch from 41a58e1 to ce41401 Compare October 21, 2026 01:37
@rnoack1
rnoack1 requested review from a team and KiroCrewCaptain as code owners October 21, 2026 01:37
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 21, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor

Hold. Gating session rename on connected at the sinks that already own rename follows the folder-rename pattern, and CI is green. Current-head review items are unanswered, and an overlapping PR is unsettled.

What would clear this:

  1. The UX lane could not judge the phone path. No frame shows the offline Rename item in SessionActionsMenu (SessionActionsMenu.tsx#L218), which is the only rename entry on a phone. Add a phone-width offline menu frame and a desktop tooltip frame, and reply to its two layout notes.
  2. Answer the First Principles and Design notes on the duplicated refocusTick / wasConnected code (rename.ts#L93-L101, SessionTitleControl.tsx#L142): share it, or say why not.
  3. Settle the overlap with fix(sidebar): dim session-menu writes while the gateway is offline #10911, still open, which adds the same utils.offline.rename_sessions key and gates the same menu item (needs-author-decision).

Reviewed head: 18c9118

— crew-pr-reviewer (r118)

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 22, 2026
@rnoack1
rnoack1 force-pushed the fix/gate-session-rename-while-offline branch from 18c9118 to 50dbc27 Compare October 22, 2026 15:28
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Oct 22, 2026
@rnoack1
rnoack1 force-pushed the fix/gate-session-rename-while-offline branch 2 times, most recently from 0b58667 to 53b1bc1 Compare October 23, 2026 12:29
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Oct 23, 2026
@rnoack1
rnoack1 force-pushed the fix/gate-session-rename-while-offline branch from 53b1bc1 to f4f5868 Compare October 26, 2026 21:51
@github-actions github-actions Bot added readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention labels Oct 26, 2026
@rnoack1
rnoack1 force-pushed the fix/gate-session-rename-while-offline branch from f4f5868 to 87c318a Compare October 27, 2026 07:33
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 27, 2026
@rnoack1
rnoack1 force-pushed the fix/gate-session-rename-while-offline branch from 87c318a to f6e4d03 Compare October 28, 2026 15:03
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Oct 28, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor

Hold: the branch no longer merges into main.

The fix looks sound. Both rename sinks are gated on connected. The sidebar and header commit paths return before closing the editor, so the typed draft is kept. The phone's menu-only Rename entry is dimmed and shows a visible reason. The current head also adds the phone-width offline menu frame that r118 asked for. All five AI lanes pass on this head, and their notes do not block (listed below).

What would clear this:

  1. Rebase onto main. website/src/pages/chat-sidebar/SessionRow.tsx conflicts with recent sidebar changes (feat(sidebar): add Copy session ID and Reference in chat to the session menu #22684, feat(crew-mode): the Crew panel, crew list and timeline #25097, perf(web): stop sidebar rows re-rendering their context menu tree #24107), and GitHub reports the PR as conflicting (SessionRow.tsx#L1639).
  2. Settle the overlap with fix(sidebar): dim session-menu writes while the gateway is offline #10911, which is still open, adds the same utils.offline.rename_sessions key and gates the same menu item. The needs-author-decision label is still set.
  3. The newest SAST (Semgrep) run on this head was cancelled after 1s, following an earlier success. A rebase push will re-run it.

AI findings judged non-blocking:

Reviewed head: cd54848

— crew-pr-reviewer (r134)

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Security Scope Review (fork) — 🔴 BLOCK (blocking)

Which legitimate operations does dffa73ea3fde901769baf1753b47bab795ad961f newly refuse? Model proposes, scripts/deny_diff.py decides — updated in place on each push. A script-confirmed regression blocks PR readiness.

the review scope was never resolved: the generate job did not finish (it timed out, failed or was cancelled), so no leg ran; its log names the step that stopped

No [SCOPE-REVIEWED] marker for this head was produced, so the model's text is withheld: it cannot be shown to describe this revision. See the job logs.

A rename typed while the gateway was down was accepted and silently lost, and a
late reply could overwrite a newer title. Split from a larger sweep.

@iamwhatever iamwhatever 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.

Approve at d0047ca.

The fix is sound. Both rename hosts read useConnected() themselves and gate twice: when the editor opens and again at commit. The sidebar returns before setRenamingSlot(null) (rename.ts#L165-L173). The header keeps its editor open through a latch that Escape still overrides (SessionTitleControl.tsx#L225-L230). Either way, the typed name survives and no request is sent. Online behaviour is unchanged.

Our r134 hold is cleared. The branch merges cleanly into current main. #10911 has merged, so the shared key and menu gate now come from main. Every check on this head is green or skipped.

AI findings judged non-blocking:

  • Design / First Principles: the description says this PR changes SessionActionsMenu.tsx and adds rename_sessions to 13 catalogues. Both are already on main from #10911 (SessionActionsMenu.tsx#L256). This is a record-accuracy issue with no runtime effect. Please reword those two paragraphs before merge. The commit message's 'a late reply could overwrite a newer title' should go too, since Not a goal rules out the race fix.
  • Design / First Principles: the connectedChannelLinks move is a byte-identical move with a re-export (connectedChannelLinks.ts, SessionRow.tsx#L160). It is needed to keep SessionRow.tsx under the 2,000-line cap.
  • Design: the phone shell row is now minmax(42px,auto). It stays 42px whenever content fits and only grows where content used to spill under the offline strip (App.tsx#L625).
  • UX: the header notice baseline and gap, and the spacing between the sidebar notice and the preview line, are cosmetic. The text, role and placement are correct (SessionTitleControl.tsx#L440-L446, SessionRow.tsx#L1893-L1899).

Optional: onRenameCommit now depends on renameScope and connected (rename.ts#L243). The row memo therefore changes when a rename arms in a new scope or connectivity flips, which the comment at L113 says should not happen. Reading renameScope through a ref would keep that promise. It has no effect on correctness.

The needs-author-decision label is stale now that #10911 has merged.

— crew-pr-reviewer (r147)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor) needs-author-decision PR blocked on author input

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants