Skip to content

Add Jira Cloud domain skill (REST via in-tab fetch, multi-site discovery, traps) - #514

Open
ardasisbot wants to merge 1 commit into
browser-use:mainfrom
ardasisbot:domain-skill/jira-cloud
Open

Add Jira Cloud domain skill (REST via in-tab fetch, multi-site discovery, traps)#514
ardasisbot wants to merge 1 commit into
browser-use:mainfrom
ardasisbot:domain-skill/jira-cloud

Conversation

@ardasisbot

@ardasisbot ardasisbot commented Jul 13, 2026

Copy link
Copy Markdown

Adds domain-skills/jira/scraping.md for Jira Cloud (*.atlassian.net).

Field-tested findings:

  • Skip DOM scraping: every logged-in tab can call /rest/api/3/search/jql same-origin with session cookies — the js() + window-stash + poll pattern is included since js() doesn't await promises.
  • POST /gateway/api/available-sites enumerates all Atlassian sites the account can reach — critical because the obvious site can be empty while the real tickets live on a sibling site, and cookies are per-subdomain (open a tab on the other site before fetching).
  • Traps: /jira/your-work redirects after load (clears injected window state), empty results and JQL errors both return HTTP 200, service-desk projects are plain-JQL searchable, old /rest/api/3/search is deprecated in favor of /search/jql.

🤖 Generated with Claude Code


Summary by cubic

Adds a Jira Cloud domain skill doc for *.atlassian.net that uses same-origin REST via in-tab fetch with session cookies for fast JQL access, plus multi-site discovery to avoid empty results. Skips DOM scraping and outlines key traps.

  • New Features
    • In-tab fetch pattern with credentials: "include" and window-stash + polling since js() doesn’t await promises.
    • Multi-site discovery via POST /gateway/api/available-sites; cookies are per subdomain — open a tab on the target site first.
    • Key notes: use /rest/api/3/search/jql; /jira/your-work redirects; empty/JQL-error responses can be HTTP 200; service-desk projects are searchable with plain JQL.

Written for commit b533f2a. Summary will update on new commits.

Review in cubic

…raps

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="agent-workspace/domain-skills/jira/scraping.md">

<violation number="1" location="agent-workspace/domain-skills/jira/scraping.md:14">
P1: The `js()` function in this codebase awaits Promises (`await_promise=True` in the CDP Runtime.evaluate call), so the entire `window.__r` + polling pattern documented here is built on a false premise. `js()` will wait for the fetch Promise to resolve and return its value. The pattern shown overcomplicates the approach. Instead, the fetch can return the JSON result directly in a single `js()` call, making the pattern much simpler and more reliable — no polling, no window stash, no race conditions.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

## The pattern

Open a tab on the Jira site, then fetch same-origin with `credentials: "include"`.
`js()` doesn't await promises, so stash the result on `window` and poll:

@cubic-dev-ai cubic-dev-ai Bot Jul 13, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: The js() function in this codebase awaits Promises (await_promise=True in the CDP Runtime.evaluate call), so the entire window.__r + polling pattern documented here is built on a false premise. js() will wait for the fetch Promise to resolve and return its value. The pattern shown overcomplicates the approach. Instead, the fetch can return the JSON result directly in a single js() call, making the pattern much simpler and more reliable — no polling, no window stash, no race conditions.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At agent-workspace/domain-skills/jira/scraping.md, line 14:

<comment>The `js()` function in this codebase awaits Promises (`await_promise=True` in the CDP Runtime.evaluate call), so the entire `window.__r` + polling pattern documented here is built on a false premise. `js()` will wait for the fetch Promise to resolve and return its value. The pattern shown overcomplicates the approach. Instead, the fetch can return the JSON result directly in a single `js()` call, making the pattern much simpler and more reliable — no polling, no window stash, no race conditions.</comment>

<file context>
@@ -0,0 +1,55 @@
+## The pattern
+
+Open a tab on the Jira site, then fetch same-origin with `credentials: "include"`.
+`js()` doesn't await promises, so stash the result on `window` and poll:
+
+```python
</file context>
Fix with cubic

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