Skip to content

Fix Jira transport after network changes - #5630

Merged
Jinwoo-H merged 1 commit into
mainfrom
Jinwoo-H/bug-jira-integration-dies-on-network-change-fetc
Jun 17, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
Jinwoo-H/bug-jira-integration-dies-on-network-change-fetc

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • route Jira API calls through Electron net.fetch instead of global fetch
  • bridge Electron proxy/session settings before each Jira request
  • add trace attributes for Jira transport/proxy failures
  • cover fetch failed transport behavior without clearing credentials

Fixes #5593

Test plan

  • pnpm vitest run src/main/jira/client.test.ts
  • pnpm exec oxfmt --check src/main/jira/client.ts src/main/jira/client.test.ts
  • pnpm exec oxlint src/main/jira/client.ts src/main/jira/client.test.ts
  • pnpm run typecheck:node

Made with Orca 🐋


Open in Stage

@ghost

ghost commented Jun 17, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 2 individual chapters for you:

Title
1 Implement Jira transport using Electron net.fetch
2 Update Jira client tests for Electron transport
Open in Stage

Chapters generated by Stage for commit f232cf5 on Jun 17, 2026 8:44pm UTC.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 624091d6-3ae2-427f-8b73-babfc0abaadb

📥 Commits

Reviewing files that changed from the base of the PR and between 9e3b3ca and f232cf5.

📒 Files selected for processing (2)
  • src/main/jira/client.test.ts
  • src/main/jira/client.ts

📝 Walkthrough

Walkthrough

Jira HTTP requests in client.ts are now routed through a new jiraFetch helper instead of the global fetch API. jiraFetch wraps net.fetch from Electron with a call to ensureElectronProxyFromEnvironment, withSpan('jira.request') instrumentation, proxy-failure span events, and structured transport error attributes via a new describeErrorCause helper. requestWithCredentials and jiraRequest are updated to call jiraFetch. Tests replace globalThis.fetch mocks with hoisted Electron net mocks (netFetchMock, resolveProxyMock, setProxyMock, closeAllConnectionsMock), update existing assertions accordingly, and add two new test cases covering transport failure token preservation and proxy environment bridging.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: migrating Jira requests to use Electron's network layer to fix transport issues after network changes.
Description check ✅ Passed The description includes most required sections: Summary, Test plan, and explicitly fixes #5593. However, it omits Screenshots, AI Review Report, Security Audit, and Notes sections from the template.
Linked Issues check ✅ Passed All key objectives from issue #5593 are addressed: routes through Electron net.fetch, bridges proxy settings, adds trace attributes for errors, and preserves credential handling for transport errors.
Out of Scope Changes check ✅ Passed All changes are scoped to Jira transport layer (client.ts and client.test.ts). No unrelated modifications detected beyond the Jira fetch/proxy integration work.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Jinwoo-H
Jinwoo-H merged commit abc3037 into main Jun 17, 2026
2 checks passed
@Jinwoo-H
Jinwoo-H deleted the Jinwoo-H/bug-jira-integration-dies-on-network-change-fetc branch June 17, 2026 21:58
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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.

[Bug]: Jira integration dies on network change ("fetch failed"), only recovers on full app restart

1 participant