Repository navigation
feat(issue-pane): rework the Jira panel and render self-hosted Jira bodies - #64
Merged
Merged
Conversation
…odies The right-sidebar issue panel, the Jira comment box, and how a self-hosted Jira's bodies reach the screen, plus the fix for a task-created workspace losing its Jira link. - Issue tab takes the provider's own mark; the pane header makes the issue number the link and gains unlink / re-link actions for Jira, GitHub and Linear, reusing the workspace dialog's own clearing rule - the Jira comment box becomes the shared Markdown composer (bubble, inline formatting, circular send); its Markdown is converted per site to wiki markup or ADF, and only bodies the composer wrote are reinterpreted - self-hosted descriptions and comments render from Jira's own HTML, parsed with parse5, with attachment images served from the existing cache - a Jira task's link is no longer dropped silently when the issue's project field disagrees with its key
nplez1
added a commit
that referenced
this pull request
Oct 9, 2026
Upstream @ 1cda323 (199 commits) onto the release line from 6a7b39c (merge base e5ade4b). 37 conflicted paths: no-markers 15, both-rewrote 9, modify/delete 7, union 4, rename-replay 1, duplicate-tail 1. Conflict resolutions - Upstream rebuilt the worktree-meta dialog in b1cd858, deleting the five files the fork's Jira-link PRs (#52, #64) had extended and shipping the same feature in a linked-items/attachments model. Fork owner decided the convergence: take upstream's model, drop the fork's superseded modules (use-worktree-issue-link, WorktreeIssueLinkField, worktree-issue-displacement, worktree-meta-updates and its test, plus use-worktree-meta-save, use-worktree-meta-issue-row, use-worktree-meta-jira-link, issue-link-provider-options, the dialog test harness and the fork dialog test). Jira linking survives on upstream's side, which is the superset: `provider: 'jira'` attachments with jiraIdentifier and taskSourceContext, a "Jira task (URL)" composer kind backed by a site-aware source with an account chooser, and bare-key linking through the search rows. - Re-homed the one fork-only rule that survived: buildIssueUnlinkUpdates moved to sidebar/workspace-issue-unlink-updates.ts, so the Jira issue pane's Unlink still clears the GitHub number, the Linear key and the created-from work item together. - Re-seated the fork's merge-readiness marker into upstream's WorktreeReferenceStack (ReviewIconWithMergeMarker plus the hostedReviewMergeVerdictLabel suffix), and split WorktreeCardStatusSlot's label so a collection checks summary owns the checks half while the merge blocker still reaches the screen reader. - The two retired test inventories took the deletion (ledger: "Test inventories retired upstream"). Breaks a clean merge left behind, found by the gates - main-window-actions.ts imported getDashboardPopoutWindow, which the fork deleted; the serve-mode quit loop closes only the main window again, and the two tests that mocked the popout lost that mock. - The fork's three Jira board RPC methods were missing the `permission` field upstream made required; they are `workspace`, like jira.listIssues. - orphaned-local-worktree-cleanup's global cache invalidation is redundant now that the call site does the repo-scoped one, and it was the global clear upstream's test forbids on an orphan removal. - en.json dropped 8 upstream copy changes the hand-union missed; both catalogs regenerated. - managed-hook-install-lock.ts hard-coded ~/.orca for the install lock parent, bypassing HOME_DIRECTORY_NAME. Pre-existing, exposed by the merge's test. - ai-vault-session-refresh's scan key kept the host query but the upstream list-request adapter dropped it, so a changed query served the unfiltered cache. Generated files regenerated, not merged: bundled-skill-guides.ts, en-runtime-required.json, the locale catalogs, and the rpc params catalog (already current). Verification: pnpm tc clean, post-sync.mjs green, targeted suites green.
nplez1
added a commit
that referenced
this pull request
Oct 9, 2026
…it options Merging a review-gated pull request with the admin bypass failed on every attempt from the right sidebar, and from every other surface that offers it: the confirmation appeared, the user accepted it, and the merge was refused with "This pull request requires review approval before it can be merged." The same merge succeeded on github.com. Confirmed on #63 and #64, both merged by hand in the end. `getGitHubLocalGitOptionArgs` returns `[]` when a repo has no local git options — the ordinary case for a local checkout with no WSL routing and no gh account bound to the repo. Both host entry points spread that array immediately before a trailing options object: ...getGitHubLocalGitOptionArgs(store, repo), { bypassBranchProtection: args.bypassBranchProtection === true } An empty array spreads to nothing, so the options object became the sixth argument (`localGitOptions`) and `mergePR`'s seventh parameter (`options`) took its default `{}`. `options.bypassBranchProtection === true` was therefore false, so the preflight refused to authorise the bypass it had just been asked for and returned the review-approval error. A WSL repo, whose options array is non-empty, was unaffected — which is why that suite passed while the SSH/local one asserted the shifted call as if it were the contract. Both call sites now materialise the argument with the `[0] ?? {}` idiom the neighbouring runtime commands already use (`runtime-github-repository-query-commands`, `runtime-github-review-query-commands`), so the trailing options object cannot be displaced. Nothing else moves. The running build carries the same shape (`out/main/index.js` in Orca NP 1.4.214-np.22), and the real preflight called against #63 while it was still open returned `{"error":null,"adminBypass":true}` — the permission was never the problem, only the lost flag. Verified: the new and corrected suites fail 4 of 7 with the production change stashed and pass with it; `github-wsl-runtime-routing`, `rpc/methods/github`, `client-pr-admin-merge-bypass` and `pr-mutation-review-invalidation` pass (68 tests); `pnpm tc` and `pnpm lint` clean; full `pnpm test` 112,892 passed / 56 failed, every failure in a class already recorded as red on this machine's base and none of them importing the changed modules.
8 of 9 tasks
nplez1
added a commit
that referenced
this pull request
Oct 9, 2026
…it options (#67) Merging a review-gated pull request with the admin bypass failed on every attempt from the right sidebar, and from every other surface that offers it: the confirmation appeared, the user accepted it, and the merge was refused with "This pull request requires review approval before it can be merged." The same merge succeeded on github.com. Confirmed on #63 and #64, both merged by hand in the end. `getGitHubLocalGitOptionArgs` returns `[]` when a repo has no local git options — the ordinary case for a local checkout with no WSL routing and no gh account bound to the repo. Both host entry points spread that array immediately before a trailing options object: ...getGitHubLocalGitOptionArgs(store, repo), { bypassBranchProtection: args.bypassBranchProtection === true } An empty array spreads to nothing, so the options object became the sixth argument (`localGitOptions`) and `mergePR`'s seventh parameter (`options`) took its default `{}`. `options.bypassBranchProtection === true` was therefore false, so the preflight refused to authorise the bypass it had just been asked for and returned the review-approval error. A WSL repo, whose options array is non-empty, was unaffected — which is why that suite passed while the SSH/local one asserted the shifted call as if it were the contract. Both call sites now materialise the argument with the `[0] ?? {}` idiom the neighbouring runtime commands already use (`runtime-github-repository-query-commands`, `runtime-github-review-query-commands`), so the trailing options object cannot be displaced. Nothing else moves. The running build carries the same shape (`out/main/index.js` in Orca NP 1.4.214-np.22), and the real preflight called against #63 while it was still open returned `{"error":null,"adminBypass":true}` — the permission was never the problem, only the lost flag. Verified: the new and corrected suites fail 4 of 7 with the production change stashed and pass with it; `github-wsl-runtime-routing`, `rpc/methods/github`, `client-pr-admin-merge-bypass` and `pr-mutation-review-invalidation` pass (68 tests); `pnpm tc` and `pnpm lint` clean; full `pnpm test` 112,892 passed / 56 failed, every failure in a class already recorded as red on this machine's base and none of them importing the changed modules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
The right-hand "Issue" tab shows the Jira (or GitHub/Linear) issue a workspace is linked to. This PR makes that tab and the panel behind it actually usable: the icon identifies the provider, the issue number is the link, there are unlink/re-link actions, the comment box works like Slack's, and — the big one — Jira issues hosted on your own server finally render their description instead of a wall of
{code}and{panel}braces.What Changed
Before
{code},{panel},{*}— and were rendered as Markdown, so the macros appeared literally in the panel.After
renderedFields.description,renderedBody), with inline images pointed at Orca's cached attachments and root-relative links made absolute. Cloud keeps the ADF path.Mechanism
IssuePaneHeaderis presentational and now takes the provider's mark from one shared table (providerIconComponent), anonOpenIssuehandler and the link actions;useLinkedIssuePaneActionsowns them for the active workspace.buildIssueUnlinkUpdateswas extracted fromworktree-meta-updates.tsand the dialog's empty-Issue-field branch now calls it too, so the panel and the dialog cannot drift. It empties the GitHub number slot, the Linear key when one is held, and a created-from issue item with its reading context — and leaves a PR/MR item alone. A folder workspace, which cannot store a link edit, gets the menu disabled with the reason visible rather than an action that silently does nothing.CommentComposer;applyMarkdownActionand the deferred caret-restore timer moved tolib/and the existing PR-comment composer now uses both.renderedJiraHtmlToBodyparses Jira's HTML with parse5 (new declared dependency, bundled into the main bundle) and rewrites attachment images and relative links.markdownCommentBodyconverts a composer body per site; the request carriesbodyFormat: 'plain' | 'markdown'so only the composer's Markdown is reinterpreted.Fix in the same area: a Jira task's link was silently dropped at composer-seed time when the issue's
projectfield disagreed with its key — the Tasks-page path derived the project key fromproject.keywhile the identity check derives it from the key prefix, so the pair failed to match and the item was discarded without a toast. It now derives the key the same way the dialog does, and refuses loudly (the existing toast) when the URL is not a Jira issue URL or names a different key.Why
- itemfrom a list, so applying it to every caller would have changed bodies the CLI or a paired client sent. The optional field is additive: an older host ignores it and stores the body verbatim.>, quote styles vary, and entities must be decoded once and re-encoded once. A first pass with patterns reproduced four such defects; the parser removes the class.Linked Issue
None — fork-local work on the
JIRA-Issuesworktree; this branch targetsnplez1/main, not upstream.Visual Proof
N/A — and I want to be straight about why this is a gap rather than a true "no visual change": this PR does change rendered UI (the tab icon, the pane header, the comment composer). No Electron instance was launched while making the change, so nothing here has been seen on screen. Behaviour is covered by the tests listed below. BEFORE is reproducible from the current
nplez1/maintip; on request I'll attach BEFORE/AFTER CDP screenshots of hidden renderers.Testing
All 60 failures are classified, and none belongs to this change:
agent-session-*,agent-launch-*,structured-agent-session-*)bunproject only (repro-13767-…,shell-startup-feature-channel,daemon/shell-ready)Cannot find package 'pg' imported from cloud/apps/relay/src/database.tsThree further failures sit outside those classes and were classified rather than assumed:
session-search-agent-set-downgrade,qoder-history-search-downgrade(both 30 s timeouts in the legacy-release-checkout family) andforeign-sqlite-reader-event-loop(an event-loop occupancy ratio). Re-running exactly those three files in isolation gives 3 files passed, 19 tests passed, exit 0 — load-sensitive, not this change's. Neither family references anything this PR touches.This PR adds a runtime dependency (
parse5), so I checked the packaging path directly. The desktop chain passes (build:electron-vite,verify:built-skills-cli,build:web-from-renderer), butpnpm build/pnpm build:unpackcannot complete on this machine:mobile/is a separate workspace with its own lockfile and is not installed here, sobeforePackstops at[verify-packaged-mobile-web-bundle] no bundle manifest at out/mobile-web/manifest.jsonbeforeafterPackruns. Rather than assume, I applied the packaging guard's own condition to the real built bundle with its exported predicate: withparse5inBUNDLED_MAIN_DEPENDENCIESthe main bundle has no bareparse5specifier, and removing that one entry reproduces a barerequire("parse5")— which is precisely thePackaged main bundle has bare runtime imports without copied node_modules: parse5failure that prompted the fix. TheafterPackguard itself has not been executed here; CI or a full release build should confirm it.Tests added/updated:
jira-rendered-html(parse5 rewriting, incl. context paths and the four regex defects),jira-comment-body(Markdown → wiki/ADF, escapes, fenced code, CRLF parity, plain-text parity withtextToAdf),jira-issue-server-body(self-hosted read path),jira-issue-mutations(per-site payloads, and that an unmarked body is stored verbatim),adf-markdown(marks survive a read),comment-composer,comment-composer-focus-timer,IssuePaneHeader(identifier link, menu, disabled reason),GithubLinkedIssuePane,worktree-meta-updates(buildIssueUnlinkUpdates),task-page-jira-item-source-context(project-key derivation, refusal cases). The four link-loss tests fail against the old derivation and pass against the new one — verified by restoring it temporarily.Platforms: macOS (arm64) only. No packaged build was produced (see above). No Linux, Windows, SSH/remote host, or paired-client run. Self-hosted Jira behaviour is exercised against the real read/write code paths with a mocked HTTP transport; no request was made to a live Jira, so endpoint acceptance of the generated ADF is argued from the published ADF schema, not observed.
AI Disclosure
Written with an AI coding agent, with review passes by other models: two adversarial reviews by GPT-6.1-Sol (which found, and I then fixed, a packaging blocker — a new runtime dependency that the packaged-build guard would have rejected — plus a body-mangling regression and a lost-mark round-trip), and one investigation pass by Claude Opus 5.5 that located the silent link-loss mechanism above. Every claim in the testing table was reproduced locally.
Review
Both review passes are reflected above. Notably, the ADF this PR generates was validated against Atlassian's published ADF JSON schema (version 1,
codemarks, paragraphs inside blockquotes, paragraph-bearing list items, empty paragraph content), and the wiki wrappers against Atlassian's own wikimarkup token table.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
CommentMarkdown's existingrehypeRaw+ sanitize pipeline; injecteddata:image URLs were confirmed to render while scripts, event handlers andjavascript:links are stripped.URLsemantics so a context-path install (https://host/jira) does not double the prefix; no path or shortcut assumptions added.bodyFormatis optional, so a mixed-version client and host still interoperate.bodyFormatand stores its body verbatim, exactly as before.Checklist
N/Awith reason — gap, explained abovepnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass — tc and lint clean; test is 57 documented failures + 3 load-sensitive ones, all classified above;pnpm buildis blocked by the uninstalledmobile/workspace, so the packaging guard's condition was verified directly against the built bundle instead