Skip to content

fix(workspace): keep Goal context and disable Lark setup without lark-cli - #5264

Open
songoow wants to merge 2 commits into
loopx-project:mainfrom
songoow:codex/workspace-lark-cli-capability-gate
Open

songoow wants to merge 2 commits into
loopx-project:mainfrom
songoow:codex/workspace-lark-cli-capability-gate

Conversation

@songoow

@songoow songoow commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

  • Outcome basis / optional anchor: reproduced defect (no issue).
  • Goal/source and gap: without lark-cli, every /api/chat/lark/* request returns 503 lark_cli_not_installed. (1) The workspace fetched Goal repository contexts and Lark connections with one Promise.all, so that 503 also discarded every Goal's repository context and the Goal drawer silently lost its repository card. (2) Lark settings explained that lark-cli is missing but still offered New Lark App, whose setup dialog then failed with the same error.
  • Observable before → after: with lark-cli absent, before the Goal drawer had no repository card and New Lark App was enabled; after the repository card is shown and New Lark App is disabled next to the existing 未发现 lark-cli… explanation.
  • Issue/task and intended base: none; base main.

Scope And Continuation

  • Completed scope and remaining work: complete within this scope. The two optional sources now load and fail independently. Settings disables setup only for lark_cli_not_installed / lark_cli_not_executable, which the Chat service resolves once at startup; other Lark errors keep the current behavior.
  • Slice boundary / successor: the workspace still issues one Lark request that returns 503 when lark-cli is missing; /api/chat/capabilities already exposes lark_cli.available, and gating that request on it would need the capability threaded from dashboard-page.tsx. Not needed for this fix.

Validation

  • Tested revision: 714f256
  • Run state: finished
  • Input classes: synthetic
Check kind Result Public-safe evidence / limitation
static passed npx tsc --noEmit in apps/presentation/dashboard.
integration passed New scenario LOOPX_PERSONAL_WORKSPACE_SCENARIO=lark-cli-missing node examples/personal-workspace-browser-smoke.mjs (2 runs): Lark requests answer the service's 503; requires the loopx-ai/loopx repository card in the Goal drawer and a disabled New Lark App.
regression_parity passed Failing-before checks: with both source changes reverted the scenario stops at the missing repository card; with only the Settings change reverted it fails on the enabled New Lark App.
integration passed 16 scenarios that pass on main also pass here, including typed-actions (repository card with Lark available).
real_entrypoint passed loopx serve-status + loopx chat on an isolated synthetic registry on a host without lark-cli: main showed no repository card and an enabled New Lark App; this branch shows the card and disables the button.
integration not_run Six scenarios (goal-draft, capability-scope, steward-group-trigger, conversation-input, automation-cadence, steward-model-settings) already fail on a clean main checkout.
  • Coverage and gaps: both changed paths have a dedicated failing-before assertion and a real-service check. None identified beyond the scenarios already failing on main.

Frontend / Visual Evidence

  • UI impact: changed
  • Before: Goal drawer without a repository card; New Lark App enabled under the missing-lark-cli message.
  • After: repository card present; New Lark App disabled under the same message.
  • States and viewports shown: desktop 1440×900, lark-cli missing (screenshots available on request; not attachable from the CLI).
  • Source data: synthetic
  • Attention review: no new element; a control that could only fail is disabled beside the reason already on screen.

Type of Change

  • Bug fix
  • Test update

LoopX Area

  • Public docs or presentation surface (README, protocols, dashboard)

Technical Direction

  • Direction / acceptance reference, when applicable: Operator surface and IM integration.

Shared-authority RFC fixture impact

N/A

Boundary Checklist

  • Neither the diff nor this PR body/comments/attachments disclose private state, credentials, raw traces or verifier output, internal links, or local machine paths.
  • I did not duplicate maintainer-owned benchmark work unless a maintainer split out a public issue for it.
  • I kept the change scoped to the linked issue/task.
  • I completed the visual evidence section for UI changes, or marked UI impact none.
  • Every commit includes a DCO Signed-off-by trailer (git commit -s).

Future-facing refactor pass: considered threading capabilities.lark_cli into the workspace; deferred because the Settings page already receives the typed error code and the fix does not need a second source of the same fact.

…-cli

The workspace loaded Goal repository contexts and Lark connections with one
Promise.all. Without lark-cli every Lark request returns 503, which also
dropped every Goal's repository context, so the Goal drawer silently lost
its repository card.

Load the two optional sources independently. In Lark settings, a
lark_cli_not_installed or lark_cli_not_executable answer now also disables
New Lark App next to the existing explanation, instead of letting the setup
dialog fail with the same error.

Signed-off-by: song <liusongstep@gmail.com>
A new lark-cli-missing scenario answers Lark requests with the service's
lark_cli_not_installed 503 and requires the Goal repository card to stay
visible and New Lark App to be disabled.

Signed-off-by: song <liusongstep@gmail.com>

This branch has not been deployed

No deployments
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