Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix(linear): sync status when reconnecting saved installations
chengyongrua3686d5eba9e
diff --git a/nanobot/channels/linear/tests/webui/LinearPanel.test.tsx b/nanobot/channels/linear/tests/webui/LinearPanel.test.tsxindex 2e6dae199..ab9090ab3 100644--- a/nanobot/channels/linear/tests/webui/LinearPanel.test.tsx+++ b/nanobot/channels/linear/tests/webui/LinearPanel.test.tsx@@ -348,6 +348,23 @@ describe("Linear channel UI", () => {expect(screen.queryByText("Authorization stopped.")).not.toBeInTheDocument();});+ it("updates the running status when an existing installation connects without OAuth", async () => {+ const feature = savedFeature();+ mockFeature(feature);+ requestMutationMock.mockResolvedValueOnce({+ session_id: "", status: "succeeded",+ nanobot_features: {+ features: [{ ...feature, enabled: true, running: true, runtime_status: "running" }],+ enabled_count: 1,+ },+ });+ renderSettingsView({ initialSection: "channels" });+ fireEvent.click(await screen.findByRole("button", { name: "View Linear settings" }));+ fireEvent.click(await screen.findByRole("button", { name: "Connect Linear" }));+ expect(await within(screen.getByRole("dialog")).findByText("Connected", { exact: true })).toBeVisible();+ expect(screen.getByRole("button", { name: "Connect another workspace" })).toBeEnabled();+ });+it("does not mark saved credentials or a failed runtime as connected", async () => {mockFeature({ ...savedFeature(), enabled: true, configured: true, runtime_status: "failed",runtime_error: "Linear channel failed to start" });diff --git a/webui/src/components/settings/channels/ChannelQrConnectFlow.tsx b/webui/src/components/settings/channels/ChannelQrConnectFlow.tsxindex 721381c4b..3a6d26989 100644--- a/webui/src/components/settings/channels/ChannelQrConnectFlow.tsx+++ b/webui/src/components/settings/channels/ChannelQrConnectFlow.tsx@@ -184,12 +184,15 @@ export function ChannelQrConnectFlow({...(force ? { force: true } : {}),});setConnect(payload);+ if (payload.nanobot_features) {+ onFeaturesUpdate(payload.nanobot_features);+ }} catch (err) {setError((err as Error).message);} finally {setBusy(false);}- }, [channelName, client, startParams]);+ }, [channelName, client, startParams, onFeaturesUpdate]);useEffect(() => {const requested = Boolean(connectRequestId && connectRequestId !== handledRequestId.current);