Skip to content

fix(lody): fall back to local when Git state fails - #194

Open
pythonlearner1025 wants to merge 4 commits into
mainfrom
lody/c4f9792b-c76
Open

fix(lody): fall back to local when Git state fails#194
pythonlearner1025 wants to merge 4 commits into
mainfrom
lody/c4f9792b-c76

Conversation

@pythonlearner1025

@pythonlearner1025 pythonlearner1025 commented Sep 2, 2026

Copy link
Copy Markdown
Member

What and why

An invited member can arrive at the local-project composer with the global worktree preference already persisted and a box whose local-project/git-state request fails. Lody already computes effectiveWorkdirMode === 'local', renders the worktree toggle off, and builds a local ProjectRef; two later submit gates nevertheless inspect the selected worktree value and strand both click and Enter submission.

The original version of this PR moved BlitzOS's global seed behind an asynchronous box-local probe. Review found two problems with that approach:

  • the preference is shared across workspaces on the origin, so a healthy box can seed it before the browser visits an unhealthy box;
  • moving the seed after first render breaks the healthy-box worktree default because the composer does not react to the later global-localStorage write.

This revision fixes the failure at the actual boundary:

  • restore the pre-render worktree seed and the existing repository-publication contract;
  • keep Send blocked while a requested worktree's Git state is loading;
  • after a terminal Git-state error, allow the component's existing effective local fallback through both the button and keyboard-submit paths;
  • add a regression for the cross-workspace persisted-preference case;
  • declare vendored seam patch 18 and include an upstream Lody PR sketch.

No runtime-boundary payload changes.

Vendor/upstream burden

Low. The behavioral change is three small hunks in two Lody component files, adds no API or Blitz-specific capability, and only reconciles submit gating with Lody's existing effective-mode fallback. vendor/lody/BLITZ-PATCHES.md includes the merge drill and plans/evidence/lody-git-state-fallback-pr.md is the upstream contribution sketch. Drop the seam when upstream adopts the rule.

Validation

  • GitHub CI run 918 — pass
  • npm run typecheck — pass
  • npm run lint:gate — pass (66 anti-slop findings, baseline unchanged)
  • npm test — pass in CI
  • focused webapp regression set locally — 75 passed, 1 skipped
  • local full run's one real-relay timeout passed 6/6 immediately in isolation

Checklist

  • npm run typecheck passes
  • npm run lint:gate passes
  • npm test passes
  • lint-baseline.json was not raised
  • No new payload crosses a runtime boundary
  • No Go changes
  • Seam documentation and upstream PR sketch added

pythonlearner1025 and others added 2 commits September 2, 2026 19:11
… waits for a box that answers git-state

An org member invited to a workspace opened `/chat`, typed a message, and
found the send button greyed out with no way forward. The same account could
send fine in another workspace.

`getChatLandingSubmitDisabled` (`chat-landing-derived.ts`) has exactly one arm
that can grey the button once text is typed: the local context, with a project
selected, in WORKTREE mode, while git state is loading or has errored. All
three halves of that were ours:

- worktree mode is our seed. `seedWorktreeWorkdirDefault` wrote
  `lody.workdirMode.global` at provider mount for every member, unconditionally
  (LODY-SESSIONS §0.5). Upstream defaults to `'local'`, where the arm cannot
  fire. Note the predicate reads the SELECTED mode, not `effectiveWorkdirMode`
  — so it counts against a project that has no worktree available at all.
- the local context is where a BlitzOS landing lands, because the GitHub
  context needs `publishBoxReposAsWorkspaceRepos` to find a clone with a
  GitHub remote and a local-source repo has none.
- a project is auto-selected the moment that context is active
  (`chat-landing.tsx`), so the member never has to pick one.

Once the git-state load errs it is PERMANENT — five retries, then a stuck
error — so the composer never recovers. A box that cannot answer
`local-project/git-state` became a chat surface nobody could send from.

So the seed now waits for evidence. `publishBoxReposAsWorkspaceRepos` already
asks git-state for every registered project, and it now returns that second
answer as a `gitProbe` verdict: `verified` (every project answered and at
least one is a real repository), `no-git-project` (all answered, none is a
repo — a fresh box, or only the `/workspace` root project `workdir-default.ts`
registers for plain chats), or `unanswered` (the list or any probe refused).
One refusal poisons the verdict, because the landing may auto-select exactly
the project that refused. `agent-config-gate.tsx` seeds on `verified` and
nothing else; the provider-mount seed is gone.

An unverified box is left on upstream's `'local'`, where a send always goes
out. The writer is unchanged — write-once-when-absent — so a box that verifies
on a later mount still gets the seed, and a member who set the key by hand is
still not overwritten.

WHAT THIS DOES NOT REPAIR: a browser that already holds the key. The seed is
never deleted, because our write is indistinguishable from the member's own.
Unticking the worktree pill once clears it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the asynchronous box-local seed probe with the landing's existing effective local fallback. Keep worktree selected while Git state loads, but permit both click and keyboard submission after a terminal error.

Declare the vendored seam, add a regression for the cross-workspace global preference, and include the upstream PR sketch.
@pythonlearner1025 pythonlearner1025 changed the title lody: an invited member can send in a new chat — the worktree default waits for a box that answers git-state fix(lody): fall back to local when Git state fails Sep 3, 2026
pythonlearner1025 added a commit that referenced this pull request Sep 4, 2026
f4b1ba25 fix(ci): harden Electron signing credentials [risk:high] (#358)
83c8e364 docs: publish 0.90.0 changelog (#356)
96b73fbb chore: remove useless artifacts file [skip ci]
55b3e028 fix(sessions): stabilize child tab ordering (#326)
c2cd3da6 feat(components): add Zen layout mode (#341)
65c2b0c4 Merge pull request #225 from ImSingee/feat/lody-mcp-worktree
b6d9a6f2 Merge pull request #309 from jeffwcx/fix/mention-caret-ime
ed13fa59 Merge pull request #340 from LodyAI/fix/electron-builder-keychain-password
1ff92abe fix(electron): authenticate temporary signing keychain [risk:high]
289bb7b4 feat(cli): add MCP session rename tools (#337)
8de7851e fix(components): collapse inline plan approval (#334)
bf979598 chore: acp
deb82d11 chore: update Feishu community group QR code (#331)
22af000a Merge pull request #173 from Innei/feat/electron-macos-sparkle-updater
ef3becb1 chore: merge latest main into Sparkle updater
d51546da fix(components): hide onboarding product preview on compact stages (#329)
f3f090ae Merge pull request #144 from slashdevcorpse/fix/codex-goal-continuation-and-stop-steer
e0657934 Merge pull request #257 from natsustan/feat/mobile-agent-settings
54d07d36 test(turn-diff-store): stabilize incremental GC batching
82d4dc72 chore: merge main into feat/mobile-agent-settings
df9f950b Merge pull request #274 from sinxy-sai/codex/fix-markdown-bold-autolink-189
ff27503d fix(components): let expanded proposed plans flow without internal scroll (#315)
f5649adb fix(components): right-align submenu chevrons (#313)
6aeeb8f8 fix: hide unknown Claude context usage (#308)
58b93eda fix(components): preserve mention caret during IME composition
f8f9be10 refactor(components): deduplicate Markdown AST transforms
e3e21294 refactor(components): share mdast child-replacement walker
94bede91 feat(components): show more outline hover-card lines (#303)
947affd0 Merge pull request #285 from MichaelYuhe/fix/mobile-settings-return-context
f9347134 Merge pull request #299 from EYHN/feat/browser-blocks-19818375
cd42c044 Merge pull request #291 from EYHN/feat/svg
932c83df fix(cli): harden daemon startup and status (#287)
4e6b6495 docs: add Codex P0/P1 security-focused review rules (#295)
db75b03a fix(electron): allow fake-IP proxy answers in the public browser
b04d0dcd fix(components): wrap long mention chips in sent messages (#294)
410b1816 Merge pull request #292 from LodyAI/feat/217
a4d0f547 feat: support custom DeepSeek Harness endpoints (#293)
1361a1b6 refactor(components): share malformed GFM autolink repair
99723c25 fix(electron): close the current tab or hide the window on Cmd+W (#235)
54445965 fix(components): attach SVG images as files
870fad32 Merge branch 'LodyAI:main' into codex/fix-markdown-bold-autolink-189
ad787c9b feat(electron): wire Sparkle progress into the renderer banner
b351290c feat(electron): switch macOS auto-update to Sparkle
91ffa378 fix(components): restore mobile settings source
896fd1e0 feat(site): add GitHub mark and early-bird deadline (#283)
ba6f9009 fix(components): avoid quadratic autolink marker scans
72ec3c01 fix(components): preserve explicit markdown link destinations
ad5104a8 docs: publish 0.89.4 changelog [risk:high] (#281)
3beeb8a0 chore: upgrade built-in Claude Code to 2.1.258 (#279)
dabbf960 fix(cli): scope All Changes to local worktrees (#280)
376bf98a fix(electron): report update install failures instead of success (#278)
f38ed4d3 fix(sessions): keep composer roles stable across turns (#269)
620fcfac fix(components): repair later valid bold URL closer
857e3095 fix(components): normalize mixed-case www links
88f54c35 fix(components): preserve triple-star emphasis
dcbe49d6 fix(components): narrow Markdown punctuation checks
a2fc9de7 fix(components): align escaped URL markers
e3abc684 fix(components): validate URL strong closers
1d0a0281 fix(components): tighten malformed URL repair
079c7716 fix(components): respect escaped closing markers
9629ffaf fix(components): respect escaped bold markers
4e6968ce fix(components): preserve absolute www autolink destinations
bbf83f49 fix(components): repair malformed bold URL autolinks
c7d905bf fix(components): make desktop onboarding failures honest and recoverable (#214)
08a3e474 ci: consolidate PR contribution policy (#265)
9f93538c fix(components): localize PR repair prompts (#245)
84bb1c06 fix(components): align sidebar loading skeletons (#266)
e0d958e1 fix: complete interactive Custom ACP authentication (#234)
27b56232 fix(acp): map pi, grok, and kimi to the skill dirs their engines scan (#218)
d22f12bf fix: address responsive settings review feedback
2a2fcf12 feat(site-docs): point the landing secondary CTA at GitHub (#254)
284deb68 docs: correct changelog version to 0.89.3 [risk:high] (#256)
8ed4dab3 docs: add 0.90.0 changelog [risk:high] (#255)
7cabe456 fix(components): close the remaining render-feedback loops (#253)
9ac6a780 fix: remove unused React import
e8d3421f fix(components): derive ACP run-config selection instead of reconciling it (#252)
8859029a feat(components): expose lightweight join surface (#238)
713bf290 feat(components): retry Codex capacity failures (#237)
6b022c1b fix: make provider usage layout container-aware
975e9e4f feat: streamline mobile agent settings
8064b1a0 docs: add 0.89.2 changelog [risk:high] (#250)
460cec05 fix(components): session tab pending-child follow-ups (#249)
c22dc434 perf(components): cut session-switch input latency (#247)
cac1e2a3 fix(components): take the session ?tab URL at its word (#248)
c4b336ac fix(components): allow browsing registered project folders
1857d6e9 docs: add 0.89.1 changelog (#246)
d6a23ed2 fix(components): stabilize session location tooltip refs (#241)
1b802d17 chore: bump acp-extension-codex after merge of #28
d0005ef9 feat: acp
970a5b66 docs(changelog): publish 0.89.0 release notes (#236)
a36816ab Merge pull request #233 from wong2/fix/codex-resets-attribution-link
a8f69fa9 fix(components): avoid void Trans placeholder
dd10c9fe Merge pull request #231 from MichaelYuhe/codex/fix-mobile-workspace-settings-spacing
0749b4be Merge pull request #143 from clanzhang/fix/131-restore-input-focus-after-send
55c38e9e chore: kimi acp
2c78927f fix(electron): close the current tab or hide the window on Cmd+W
2cc10249 fix(components): link Codex reset attribution
d706e3c6 fix(components): align mobile workspace settings
b7b56327 Merge pull request #226 from ImSingee/fix/codex-reset-forecast-overlay
8c957eb0 Merge pull request #205 from Innei/feat/sidebar-project-actions-menu-restyle
5ce0c481 feat(docs): add local documentation search (#228)
cef73e5b fix(components): restore blocked goal resume action (#230)
8a674e5b fix(components): inset the desktop workspace chrome out of the safe area (#210)
a9067707 Merge pull request #227 from Innei/fix/macos-dev-dock-icon
a025a354 fix(electron): set macOS development dock icon
43dda538 feat(components): render every agent's plan through one panel (#221)
60007048 fix(mcp): clarify child session workspace reuse
a320b4c6 fix(components): show the waiting-for-approval hand on mobile tab rows (#222)
10051e26 feat(components): add folders per machine from Projects settings (#220)
9f7b81c1 fix(components): correct nested reset forecast overlay
1e40d143 fix(onboarding): give the tour a read-only repo stand-in (#216)
0e3a961a feat(components): put a plan-mode turn on one rail and one panel (#215)
50147494 fix(acp): support standard ACP authentication for registry agents (#208)
cf5bf050 fix(components): restore desktop composer focus after successful send
2ddaac47 refactor(components): derive the active session tab from the router URL (#199)
e8ab5812 fix(components): align the private status pill with the header launcher (#204)
2363d34b Merge pull request #186 from kovsu/fix/settings-section-corner-clip
fe4e5aad feat(components): add local-project row actions and restyle menus
62fa9e2f Merge pull request #129 from 1-WEEK/fix/subsession-model-search-focus
a56eaa83 fix(components): grow the Rename Chat field to fit a wrapped title (#202)
2d3b5d0c Merge pull request #169 from Innei/fix/electron-per-panel-window-drag
e3cb9825 chore: upgrade built-in AI agent runtimes (#201)
4acff9a6 fix(cli): deliver MCP child-session completion notifications over the HTTP transport (#200)
73e4fc3e Merge pull request #192 from Pleasurecruise/feat/hmr
e05486b5 Merge pull request #94 from xuxu777xu/fix/builtin-agent-opt-out
2b803307 fix: bind the workspace GitHub repository to CLI-created local sessions (#197)
872453e4 fix(components): preserve active tab on session reselect (#194)
a0c2c77a fix: survive unsendable WebSocket close codes in the local preview proxy (#198)
460cb7d8 fix: publish the dispatch pointer for promoted queue turns (#166)
2b134aa1 fix: align child tab agent role selection (#181)
3f6af469 Merge pull request #190 from LodyAI/fix/mobile-auth-session-401
4185f738 feat(electron): add local hot reload workflow
95e4d02f fix(auth): recover rejected mobile sessions [risk:high]
4c91b8c2 refactor(shared): drop redundant fields from the builtin agent opt-out value
d64a99b1 fix(electron): move window drag onto per-panel title bars
41c51a5e fix(settings): clip settings sections to their rounded corners
0c5bedbe feat: let onboarding choose or skip the first Agent (#182)
22f0708c feat: guide empty conversation sync states (#180)
aac14534 fix: fill project settings modal height (#177)
7d626837 feat(electron): add hidden auto-launch option (#176)
6db6a72d Merge pull request #95 from ShobhanKarthish/fix/web-focus-input-shortcut
452aded9 Merge pull request #168 from Innei/codex/focus-scope-keyboard-navigation
853ca366 fix(components): keep the cancellation marker as the first write
9b8ea083 chore: split Electron window drag out of the keyboard navigation PR
f5b16cfd fix(components): keep multi-tab clickable while solo titles drag the window
0ffacc5e feat: add scoped keyboard navigation
795b34cb chore: bump acp-extension-codex for slash goal continuation tests
e4ac99c2 fix: force-direct Codex goal commands and bump acp-extension-codex
a02e0b46 fix(components): prevent composer focus stealing when clicking model search in subsession tabs
b90d719e fix(shared): own builtin agent opt-out from one place
75d54b37 fix(cli): keep removed builtin agent providers removed across restarts
4822079e fix: stop advertising ⌘L on web composer

git-subtree-dir: vendor/lody
git-subtree-split: f4b1ba259eb754cd954da776d8e7384a8c30f1c9
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