Skip to content

VOK-166 Hosted Linear connection management is blocked without a selected node#159

Open
vkforeman[bot] wants to merge 2 commits into
mainfrom
foreman/019deaff-3075-79d1-b3bd-d2900fe808b5
Open

VOK-166 Hosted Linear connection management is blocked without a selected node#159
vkforeman[bot] wants to merge 2 commits into
mainfrom
foreman/019deaff-3075-79d1-b3bd-d2900fe808b5

Conversation

@vkforeman
Copy link
Copy Markdown

@vkforeman vkforeman Bot commented May 2, 2026

Request

Prompt context:

<title>Hosted Linear connection management is blocked without a selected node</title> ## Summary

Commit 0ea027fab7b6647e366c978839a8a386c01d9cdc (Gate desktop Linear pages on selected Foreman node, merged by PR #158 as e3bfc337a0afc2b00c40ec338dc12a9e6da164a0 on May 1, 2026) fixes the raw error path from VOK-160, but it also turns the entire Hosted Linear Connections page into a no-op whenever selectedNodeId is null.

That is broader than the API contract: the desktop still talks to the hosted proxy for connection management, so users with a valid proxy session but no selected node can no longer inspect existing hosted workspaces, disconnect stale ones, or start a new hosted Linear connection.

Concrete repo evidence

Commit in the scan window:

  • 0ea027fab7b6647e366c978839a8a386c01d9cdc Gate desktop Linear pages on selected Foreman node

Hosted Linear page now exits before loading any hosted connection state when there is no selected node:

  • foreman-desktop/src/features/projects/components/LinearPageView.tsx:70-100
  • Lines 82-86 return early on !nextSelectedNodeId, which clears status, selectedConnectionId, and catalog before any hosted proxy request runs.

The same commit codifies that behavior in the desktop test suite:

  • foreman-desktop/src/features/projects/components/LinearPageView.test.tsx
  • The new case renders a guided prerequisite state and skips hosted Linear requests without a selected node asserts that getLinearConnectionsStatus and getLinearConnectionCatalog are not called.

But the connection-management API remains proxy-owned, not node-owned:

  • foreman-desktop/src/lib/api.ts:2778-2824
  • startLinearConnection, disconnectLinearConnection, and getLinearConnectionsStatus all use transport: 'proxy'.

Targeted verification on the fetched origin/main worktree confirms the new behavior is active and tested:

cd /tmp/foreman-daily-bug-scan/foreman-desktop
bun test src/features/projects/components/LinearPageView.test.tsx

That run passed, including the new skips hosted Linear requests without a selected node case.

User-visible impact

When the desktop has a proxy session but no selected node:

  • the Hosted Linear Connections page no longer shows existing connected workspaces
  • Connect Linear stays disabled even though the connect flow is proxy-owned
  • stale or wrong hosted workspaces cannot be disconnected from the desktop until a node is selected again

This is a regression from the pre-0ea027f behavior, where the page could still manage hosted connections independently of node selection.

Smallest safe fix

Keep the guided no-node messaging from VOK-160, but narrow the gate:

  • still load getLinearConnectionsStatus() and allow startLinearConnection() / disconnectLinearConnection() with only proxy auth
  • gate only node-dependent catalog inspection and project-binding flows on selectedNodeId
  • update the test to assert that the page shows hosted connections without a selected node while the catalog pane stays in the guided prerequisite state

Duplicate check

I checked existing Foreman Linear issues before filing. The closest matches were:

  • VOK-160 Linear desktop pages fail when no Foreman node is selected — fixed the raw error path, but did not cover this follow-up regression
  • VOK-138 Linear page can no longer add a second hosted workspace — older, resolved bug about the connect button after one existing workspace

This issue appears distinct from both.


Bug

Linear issue VOK-166: Hosted Linear connection management is blocked without a selected node
Issue URL: https://linear.app/vokality/issue/VOK-166/hosted-linear-connection-management-is-blocked-without-a-selected-node
Team: Vokality
State: Todo
Labels: Bug

Summary

Commit 0ea027fab7b6647e366c978839a8a386c01d9cdc (Gate desktop Linear pages on selected Foreman node, merged by PR #158 as e3bfc337a0afc2b00c40ec338dc12a9e6da164a0 on May 1, 2026) fixes the raw error path from VOK-160, but it also turns the entire Hosted Linear Connections page into a no-op whenever selectedNodeId is null.

That is broader than the API contract: the desktop still talks to the hosted proxy for connection management, so users with a valid proxy session but no selected node can no longer inspect existing hosted workspaces, disconnect stale ones, or start a new hosted Linear connection.

Concrete repo evidence

Commit in the scan window:

  • 0ea027fab7b6647e366c978839a8a386c01d9cdc Gate desktop Linear pages on selected Foreman node

Hosted Linear page now exits before loading any hosted connection state when there is no selected node:

  • foreman-desktop/src/features/projects/components/LinearPageView.tsx:70-100
  • Lines 82-86 return early on !nextSelectedNodeId, which clears status, selectedConnectionId, and catalog before any hosted proxy request runs.

The same commit codifies that behavior in the desktop test suite:

  • foreman-desktop/src/features/projects/components/LinearPageView.test.tsx
  • The new case renders a guided prerequisite state and skips hosted Linear requests without a selected node asserts that getLinearConnectionsStatus and getLinearConnectionCatalog are not called.

But the connection-management API remains proxy-owned, not node-owned:

  • foreman-desktop/src/lib/api.ts:2778-2824
  • startLinearConnection, disconnectLinearConnection, and getLinearConnectionsStatus all use transport: 'proxy'.

Targeted verification on the fetched origin/main worktree confirms the new behavior is active and tested:

cd /tmp/foreman-daily-bug-scan/foreman-desktop
bun test src/features/projects/components/LinearPageView.test.tsx

That run passed, including the new skips hosted Linear requests without a selected node case.

User-visible impact

When the desktop has a proxy session but no selected node:

  • the Hosted Linear Connections page no longer shows existing connected workspaces
  • Connect Linear stays disabled even though the connect flow is proxy-owned
  • stale or wrong hosted workspaces cannot be disconnected from the desktop until a node is selected again

This is a regression from the pre-0ea027f behavior, where the page could still manage hosted connections independently of node selection.

Smallest safe fix

Keep the guided no-node messaging from VOK-160, but narrow the gate:

  • still load getLinearConnectionsStatus() and allow startLinearConnection() / disconnectLinearConnection() with only proxy auth
  • gate only node-dependent catalog inspection and project-binding flows on selectedNodeId
  • update the test to assert that the page shows hosted connections without a selected node while the catalog pane stays in the guided prerequisite state

Duplicate check

I checked existing Foreman Linear issues before filing. The closest matches were:

  • VOK-160 Linear desktop pages fail when no Foreman node is selected — fixed the raw error path, but did not cover this follow-up regression
  • VOK-138 Linear page can no longer add a second hosted workspace — older, resolved bug about the connect button after one existing workspace

This issue appears distinct from both.

Session comment:
This thread is for an agent session with foreman.

Summary

Fixed the cancel-during-validation race and added deterministic server regression coverage

Checks

  • foreman-server-format: passed (exit status 0)
  • foreman-server-checks: passed (exit status 0)
  • foreman-server-tests: passed (exit status 0)

Foreman Metadata

  • Task ID: 019deaff-3075-79d1-b3bd-d2900fe808b5
  • Delivery ID: 019deb01-77e0-7023-b07f-a666ce20a8f1
  • Run ID: 019deb0d-b07e-7c60-a5f7-d43419b3e1e5
  • Attempt: 2
  • Branch: foreman/019deaff-3075-79d1-b3bd-d2900fe808b5

@vkforeman vkforeman Bot requested review from foreman-vk and rhymiz as code owners May 2, 2026 23:34
@vkforeman
Copy link
Copy Markdown
Author

vkforeman Bot commented May 2, 2026

PR #159 has a failing server test in CI: execution_cancel_during_validation_does_not_complete_after_runner_returns. Foreman will revise the current delivery to address that failure.

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