Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
baea8b6
chore(fork): restore contributor tooling branding and release configu…
github-actions[bot] Nov 8, 2026
2352796
feat(identity): restore shared state authorization and identity contr…
github-actions[bot] Nov 8, 2026
83e2c11
feat(providers): restore fork providers Git and source-control behavior
github-actions[bot] Nov 8, 2026
4bc099c
feat(server): restore fork orchestration persistence and runtime serv…
github-actions[bot] Nov 8, 2026
989c9ea
feat(browser): restore native preview authentication and agent browse…
github-actions[bot] Nov 8, 2026
0ac13da
feat(integrations): restore bots Jira GitHub and work-item automation
github-actions[bot] Nov 8, 2026
71185ea
feat(web): restore fork workspace chat and settings interfaces
github-actions[bot] Nov 8, 2026
3ee439c
feat(mobile): restore fork mobile identity queue and environment feat…
github-actions[bot] Nov 8, 2026
82dc4ba
feat(desktop): restore desktop shell and VS Code integration
github-actions[bot] Nov 8, 2026
5c68672
fix(mobile): keep iOS launch alive when Nitro highlights fail to inst…
patroza Nov 8, 2026
1c52f11
Report provider failures in bot conversations (#624)
patroza Nov 9, 2026
222f184
Merge upstream main through 41443e5706c4
github-actions[bot] Nov 10, 2026
3998465
Use the exported Tabler icon type
github-actions[bot] Nov 10, 2026
0442937
Preserve client recovery and composer restoration with upstream APIs
github-actions[bot] Nov 10, 2026
624dbc1
Update preview passkey fixture for WebAuthn availability
github-actions[bot] Nov 10, 2026
6cd7809
Preserve parameterized WebAuthn availability in preview fixture
github-actions[bot] Nov 10, 2026
e674a0e
Handle shell snapshot reset markers in bot integration
github-actions[bot] Nov 10, 2026
724b6fa
Adapt fork composer controls to current upstream contracts
github-actions[bot] Nov 10, 2026
8e697b9
Port fork web fixtures to upstream onboarding and plan agents
github-actions[bot] Nov 10, 2026
179ef19
Isolate release CLI tests from inherited shell startup hooks
github-actions[bot] Nov 10, 2026
dedc6af
Model fork check lookup in GitHub Unix socket fixture
github-actions[bot] Nov 10, 2026
eda3a2b
Align mobile surface and onboarding retry fixtures with upstream
github-actions[bot] Nov 10, 2026
112d49d
Refresh fork assertions for upstream branch queries and UI cleanup
github-actions[bot] Nov 10, 2026
e938ec0
Wait for initial palette highlight before keyboard navigation
github-actions[bot] Nov 10, 2026
77db197
Keep approval-waiting PR checks live through upstream watch updates
github-actions[bot] Nov 10, 2026
1904493
Synchronize ACP session picker keyboard navigation
github-actions[bot] Nov 10, 2026
dcbef1d
Select explicit project in ACP scope preservation fixture
github-actions[bot] Nov 10, 2026
af3e1b0
Open palette project submenu explicitly in highlight regression test
github-actions[bot] Nov 10, 2026
fc17017
Accept installer PATH guidance for known and unknown shells
github-actions[bot] Nov 10, 2026
19ffdf4
Measure history prepends outside live-end following mode
github-actions[bot] Nov 10, 2026
ef722c7
Merge pull request #625 from patroza/sync/upstream-41443e5706c4
patroza Nov 10, 2026
d947087
Collect retired Chromium state between browser test files (#626)
patroza Nov 10, 2026
86724ec
Enforce MCP identity and repair historical thread attribution (#627)
patroza Nov 13, 2026
61e3abd
Merge upstream main through 4aec277f79b2
github-actions[bot] Nov 13, 2026
133ab5c
Format merged diff reveal integration
github-actions[bot] Nov 13, 2026
9e8806b
Update configured provider fallback fixture for upstream API
github-actions[bot] Nov 13, 2026
e30cdaa
Include daemon state in Tailscale status fixture
github-actions[bot] Nov 13, 2026
03176ca
Pass default branch to merged branch PR resolver
github-actions[bot] Nov 13, 2026
32be671
Reconcile repository and legacy import APIs after upstream merge
github-actions[bot] Nov 13, 2026
de244ec
Complete merged eval and VCS action fixtures
github-actions[bot] Nov 13, 2026
2dc0a45
Complete merged client and repository contracts
github-actions[bot] Nov 13, 2026
d7dfebd
Preserve reused backend PID through readiness callbacks
github-actions[bot] Nov 13, 2026
e3ade60
Update reused-backend browser ownership consumers
github-actions[bot] Nov 13, 2026
75b568f
Restore merged server fixture dependencies
github-actions[bot] Nov 13, 2026
cbd378c
Remove obsolete cache test diagnostic directive
github-actions[bot] Nov 13, 2026
20ac627
Complete shipped-provider fixture installation dependencies
github-actions[bot] Nov 13, 2026
9c7ea45
Provide Grok fixture dependencies before hydration
github-actions[bot] Nov 13, 2026
aa560ea
Cover upstream fast-forward merge settings
github-actions[bot] Nov 13, 2026
40faf4c
Align response stats fixture with upstream duration formatting
github-actions[bot] Nov 13, 2026
30e18ca
Align SSH runner assertion with managed process validation
github-actions[bot] Nov 13, 2026
db77776
Update remaining SSH managed-process assertions
github-actions[bot] Nov 13, 2026
ee87c1a
Focus visible annotation comments in picker regression test
github-actions[bot] Nov 13, 2026
4f04247
Preserve list input-rule undo across the editor upgrade
github-actions[bot] Nov 13, 2026
9afd79a
Reconcile fork client coverage with upstream UI contracts
github-actions[bot] Nov 13, 2026
723b331
Preserve queued PR wake tracking across upstream sync
github-actions[bot] Nov 13, 2026
7573d98
Retain grouped watch notices until their last contributor ends
github-actions[bot] Nov 13, 2026
2473b3a
Assert delegated delivery cohorts instead of enqueue retries
github-actions[bot] Nov 13, 2026
18b2a88
Complete current MCP project and approval fixtures
github-actions[bot] Nov 13, 2026
a1390ae
Pin the Tiptap family to the patched release
github-actions[bot] Nov 13, 2026
ea7995b
Run macOS static checks on the Intel hosted pool
github-actions[bot] Nov 13, 2026
2868427
Merge pull request #628 from patroza/sync/upstream-4aec277f79
patroza Nov 13, 2026
a9ff35c
Fix post-sync CI waits and cold macOS job budget (#629)
patroza Nov 13, 2026
5c7eea7
Validate exact CI approval without GitHub status filtering (#630)
patroza Nov 13, 2026
ef46fba
merge: sync upstream through 78b654f998f6
github-actions[bot] Nov 13, 2026
077c6c9
fix(mobile): brand saved environment filters for new tasks
github-actions[bot] Nov 13, 2026
e063ad1
test(server): provide worktree restoration in legacy fixture
github-actions[bot] Nov 13, 2026
b473a22
test: reconcile fork fixtures with upstream migration and guards
github-actions[bot] Nov 13, 2026
85b619b
Merge pull request #631 from patroza/sync/upstream-78b654f998f6
patroza Nov 13, 2026
c17bb8d
Merge upstream main through d0a754daeaa9
github-actions[bot] Nov 18, 2026
d3e5f49
test: include upstream sparse worktree configuration
github-actions[bot] Nov 18, 2026
8239bdc
test: match the merged source control settings label
github-actions[bot] Nov 18, 2026
8366341
fix: preserve fork client behavior across upstream refactors
github-actions[bot] Nov 18, 2026
74134d6
test: provide explicit locale to translated React fixtures
github-actions[bot] Nov 18, 2026
37256ef
test: adapt isolated fixtures to upstream translation and bridge APIs
github-actions[bot] Nov 18, 2026
ab848f9
test: expose native browser capability in panel-close fixture
github-actions[bot] Nov 18, 2026
8462d21
test: initialize composer attachment mock before cleanup imports
github-actions[bot] Nov 18, 2026
f04bc17
fix: preserve fork server behavior across upstream sync
github-actions[bot] Nov 18, 2026
7df3e46
test(server): isolate uninstall cleanup-shell mocks
github-actions[bot] Nov 18, 2026
4c5aadb
test(server): scope attachment spies to extraction
github-actions[bot] Nov 18, 2026
9bf6009
fix(web): release thread projections held by scroll debouncer
github-actions[bot] Nov 18, 2026
8d3d4f2
Merge pull request #632 from patroza/sync/upstream-d0a754daeaa9
patroza Nov 18, 2026
43b8662
Merge upstream main through 019e55bad5f9
github-actions[bot] Nov 20, 2026
729cd88
fix(mobile): save preferences through the current command
github-actions[bot] Nov 20, 2026
e01e39a
Merge upstream main through f2d4df036745
github-actions[bot] Nov 20, 2026
d382f4d
fix(source-control): provide FileSystem in the GitHub credential test
github-actions[bot] Nov 20, 2026
bd6bff4
fix(server): satisfy repository identity and fetch error types
github-actions[bot] Nov 20, 2026
a817c09
fix(client): supervise the network observer until it stops
github-actions[bot] Nov 20, 2026
9027796
fix(web): pass loopback reachability to alternate preview runtime
github-actions[bot] Nov 20, 2026
9034ee5
fix(server): satisfy weld test types
github-actions[bot] Nov 20, 2026
b2be284
Merge upstream main through e96357245c3e
github-actions[bot] Nov 20, 2026
cb52692
fix(client): expect connection diagnostics in supervisor retries
github-actions[bot] Nov 20, 2026
c5df50f
fix(mobile): match the citation wrapper in the markdown existence test
github-actions[bot] Nov 20, 2026
8a3c0fa
fix(web): follow the welded preview resolver and linked-items label
github-actions[bot] Nov 20, 2026
0ca1bb8
Merge upstream main through ed203c46cb
github-actions[bot] Nov 20, 2026
ce6d409
fix(web): wait longer for the mermaid diagram in the timeline copy test
github-actions[bot] Nov 20, 2026
3a318df
test(server): match upstream fetch, migrations, and sender notes
github-actions[bot] Nov 20, 2026
adee634
Merge upstream main through e6d521012d
github-actions[bot] Nov 20, 2026
0df7225
Merge upstream main through 205400e778
github-actions[bot] Nov 20, 2026
e257ca4
fix(web): do not regenerate the route tree during tests
github-actions[bot] Nov 20, 2026
d85ea1e
Merge upstream main through 898c22f990
github-actions[bot] Nov 20, 2026
4d05bea
fix(web): correct the route-tree test comment
github-actions[bot] Nov 20, 2026
4f2822c
Merge upstream main through 2c33cbdf026e
github-actions[bot] Nov 20, 2026
8f62fff
fix(web): test pull-request search without loading the page
github-actions[bot] Nov 20, 2026
abc250e
Merge upstream main through e6e1ce70c85f
github-actions[bot] Nov 20, 2026
65f3652
Merge upstream main through c7157d376d82
github-actions[bot] Nov 20, 2026
2e715eb
Merge upstream main through df09ced7688d
github-actions[bot] Nov 20, 2026
05740ca
Merge upstream main through e74b795535
github-actions[bot] Nov 20, 2026
e0d6c34
Merge upstream main through cf1032018680
github-actions[bot] Nov 20, 2026
4d0aca8
Merge upstream main through 391f93fc8fd8
github-actions[bot] Nov 20, 2026
6eefbb5
Merge upstream main through 97e7834f4ba6
github-actions[bot] Nov 20, 2026
20bb442
Merge upstream main through 1c379b63bafb
github-actions[bot] Nov 20, 2026
5ffc9f6
Merge upstream main through 9cc4018c75ff
github-actions[bot] Nov 20, 2026
bbc470f
Merge upstream main through 0bc9b57b930b
github-actions[bot] Nov 20, 2026
7712873
Merge upstream main through ccc1feb15572
github-actions[bot] Nov 20, 2026
633f7ee
Merge upstream main through c813e7db513a
github-actions[bot] Nov 20, 2026
c1ac9ff
Merge upstream main through 068332c603ce
github-actions[bot] Nov 20, 2026
682a0d0
Merge upstream main through 524c757f827a
github-actions[bot] Nov 20, 2026
b5c2870
Merge upstream main through 0702c6fdcabd
github-actions[bot] Nov 20, 2026
8d07cb5
Merge upstream main through 392526768806
github-actions[bot] Nov 20, 2026
be1d1db
Merge upstream main through 6f5293fbdca4
github-actions[bot] Nov 20, 2026
a3decf4
fix(web): give the PR panel test the side-chat host ref
github-actions[bot] Nov 20, 2026
c6f05e8
fix(web): keep upstream client tests running on the fork runner
github-actions[bot] Nov 20, 2026
ba6df87
Merge upstream main through ccabed086ad4
github-actions[bot] Nov 20, 2026
708ad35
Merge upstream main through 21d7feaff7ed
github-actions[bot] Nov 20, 2026
0c49521
Merge upstream main through f2ec853fbbb6
github-actions[bot] Nov 20, 2026
14808bc
Merge upstream main through d984b7138591
github-actions[bot] Nov 20, 2026
9dd224a
fix(server): report a merged pull request instead of refusing the watch
github-actions[bot] Nov 20, 2026
6ddb414
Merge upstream main through 2770bf3c61c4
github-actions[bot] Nov 20, 2026
8879171
Merge upstream main through a04bca5bcf36
github-actions[bot] Nov 21, 2026
381859d
Merge upstream main through 1ed4f6a96f93
github-actions[bot] Nov 21, 2026
f8fc2fd
Merge upstream main through 342b58a79ff0
github-actions[bot] Nov 21, 2026
54c8206
fix(desktop): expect the Apple Speech packaging exclusion
github-actions[bot] Nov 21, 2026
2f868b7
Merge upstream main through 6357d17a4963
github-actions[bot] Nov 21, 2026
e227277
fix(desktop): expect Apple Speech in the macOS package resources
github-actions[bot] Nov 21, 2026
f89a8ab
Merge upstream main through c5514042adfb
github-actions[bot] Nov 21, 2026
880f166
fix(web): give the pull-request rows test the usage model
github-actions[bot] Nov 21, 2026
27069e6
Merge upstream main through 67a3151c0df9
github-actions[bot] Nov 21, 2026
bf26c3e
Merge upstream main through 67a3151c0df9 (#633)
patroza Nov 21, 2026
cd4223d
ci: reuse pull request Fork CI when the push tree matches (#634)
patroza Nov 21, 2026
b774eaf
docs: land a green upstream weld instead of chasing main (#635)
patroza Nov 21, 2026
60dc1ba
Merge upstream main through 80871270f9a1
github-actions[bot] Nov 21, 2026
350ce02
fix(server): compile the weld against fork git and clone types
github-actions[bot] Nov 21, 2026
cfa99b0
Merge pull request #636 from patroza/sync/upstream-80871270f9a1
patroza Nov 21, 2026
7ec2c3a
fix(mobile): keep Apple Speech sources in the EAS archive
github-actions[bot] Nov 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
41 changes: 41 additions & 0 deletions .agents/skills/confluence-whiteboard-export/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: confluence-whiteboard-export
description: Export a Confluence whiteboard as Confluence's own PNG, PDF, or JPG, or as a cropped SVG with every pasted image embedded. Use for a whiteboard, flowchart, or diagram; for getConfluenceContent; when an SVG image has no href; or when the user runs /confluence-whiteboard-export.
---

# Confluence whiteboard export

The content id is the number in `/wiki/spaces/<space>/whiteboard/<id>`.

Choose the file from the need:

- A picture someone will read: PNG from the whiteboard's Export dialog. Use PDF when they want a document, and JPG only when they ask for JPG.
- The vector file, a crop, or the pasted pictures inside the SVG: the SVG path below.

`getConfluenceContent` with `content_format: png` is a small preview of about 1920×1080. The Export dialog is the downloadable picture.

## Readable picture

Open the whiteboard URL in a browser that is already logged in to that Confluence site.

If that profile is locked by a running Chromium, copy its user-data directory. Exclude `Cache`, `Code Cache`, `GPUCache`, Dawn caches, `SingletonLock`, `SingletonCookie`, and `SingletonSocket`. Launch against the copy, then delete the copy. Leave the running browser on its own profile.

1. In the content header, open the last **More actions** control (the one beside Share) and choose the **Export** menu item. Hovering the item does not open the dialog.
2. The dialog is inside `iframe[title="whiteboard-frame"]`, not the parent page.
3. Set the file type. Set the export area to **Entire board**. Set quality to **High quality** when that option exists. The quality control is the react-select whose value reads "Normal quality" or "High quality". An input covers that value, so force-click its `[id$="single-value"]`, then choose the high-quality option.
4. Click the button whose accessible name is exactly **Export**. Wait for the browser download and save that file.

Check a full-resolution crop of the saved file before calling it readable. A chat preview of a board several thousand pixels wide looks empty even when the file is sharp. Hand over the file and say to open it.

## SVG, crop, and pasted images

1. Call Rovo `getConfluenceContent` with the site cloud id, `content_id`, and `content_format: "svg"`. An empty `notifications/initialized` response is success. Save the raw tool text somewhere temporary, outside the repo.
2. Run `scripts/extract_svg.py <tool-output> <out.svg>` from this skill directory. The tool text is nested JSON. Slicing at the first `<svg` while the payload is still escaped writes an invalid file.
3. Count `<image` elements. Each has an `id` and a `data-file-id` and no pixel href. Attachment listing and a direct media fetch do not return those pixels.
4. In the same whiteboard iframe, the pasted pictures are `blob:` images. Wait until `naturalWidth` is greater than 0. Repeat the collection until every SVG image id has a file, or a second pass adds nothing. A picture can finish loading after the first pass.
5. Match each image's closest parent `data-entity-id` to the SVG attribute named `id`. The attribute is `id`, matched as a whole name. Save the original bytes under that id. Ignore https images whose parent id is not an SVG image id; those are chrome, not pasted pictures.
6. Write the bytes from the browser to disk. When the automation channel truncates large results, return 8 KB slices prefixed with text such as `WBi:<offset>:`, then concatenate and decode locally. The prefix must not start with `data:image/` or `/9j/`. A request from the https page to an http loopback does not carry the bytes out.
7. Put the files in one directory as `<id>.png` or `img-<n>-<id>.png` (jpg and webp are accepted). Run `scripts/embed_and_crop.py <in.svg> <image-dir> <out.svg>`. The script keeps each image's x, y, width, and height, embeds the original bytes as `href` and `xlink:href`, crops the viewBox to the content plus 80 units, and paints a white background. It leaves text, fonts, and tspans as they were. If it prints `missing`, those ids still need their files. Run it again after saving them.
8. A PNG rasterized from this SVG is a picture of the structured file. When someone needs the original lettering, deliver the Export file from the first section.

Media URLs in the page contain a credential query. Do not print, log, or commit them, cookies, or API tokens. Do not commit the profile copy or the raw tool payload.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "Confluence Whiteboard Export"
short_description: "Export a whiteboard as PNG or cropped SVG"
default_prompt: "Use $confluence-whiteboard-export to export this Confluence whiteboard, choosing PNG or SVG for the need, and include every pasted image."
169 changes: 169 additions & 0 deletions .agents/skills/confluence-whiteboard-export/scripts/embed_and_crop.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
#!/usr/bin/env python3
"""Embed pasted whiteboard images by SVG id and crop the canvas.

Text nodes are copied through unchanged. Image geometry is copied through
unchanged. Only hrefs and the root viewBox change.
"""

import base64
import re
import sys
from pathlib import Path

PAD = 80
IMAGE_RE = re.compile(r"<image\b(?:[^>]*/>|[^>]*>.*?</image>)", re.S)
ATTR_RE = re.compile(r'([\w:-]+)="([^"]*)"')
TAG_RE = re.compile(r"<(?:rect|image|ellipse)\b([^>]*)/?>")


def attrs(fragment: str) -> dict[str, str]:
return dict(ATTR_RE.findall(fragment))


def load_files(directory: Path) -> dict[str, Path]:
files: dict[str, Path] = {}
for path in directory.iterdir():
if not path.is_file():
continue
match = re.fullmatch(r"img-\d+-(.+)\.(png|jpe?g|webp)", path.name, re.I)
if match is None:
match = re.fullmatch(r"(.+)\.(png|jpe?g|webp)", path.name, re.I)
if match:
files[match.group(1)] = path
return files


def data_url(path: Path) -> str:
suffix = path.suffix.lower()
mime = {
".jpg": "image/jpeg",
".jpeg": "image/jpeg",
".webp": "image/webp",
}.get(suffix, "image/png")
encoded = base64.b64encode(path.read_bytes()).decode()
return f"data:{mime};base64,{encoded}"


def number(value: str | None, default: float = 0) -> float:
if value is None or value == "":
return default
return float(value)


def main() -> int:
if len(sys.argv) != 4:
print("usage: embed_and_crop.py <in.svg> <image-dir> <out.svg>", file=sys.stderr)
return 2
source = Path(sys.argv[1]).read_text()
files = load_files(Path(sys.argv[2]))
missing: list[str] = []
embedded = 0

def replace_image(match: re.Match[str]) -> str:
nonlocal embedded
element = match.group(0)
open_end = element.find(">")
open_tag = element[: open_end + 1]
values = attrs(open_tag)
image_id = values.get("id", "")
path = files.get(image_id)
if path is None:
if image_id:
missing.append(image_id)
return element
url = data_url(path)
body = re.sub(r'\s(?:xlink:)?href="[^"]*"', "", open_tag)
self_closing = body.rstrip().endswith("/>")
body = body.rstrip()[:-2].rstrip() if self_closing else body.rstrip()[:-1]
embedded += 1
closer = "/>" if self_closing else ">"
return f'{body} href="{url}" xlink:href="{url}"{closer}' + element[open_end + 1 :]

text = IMAGE_RE.sub(replace_image, source)
xs: list[float] = []
ys: list[float] = []

def add_box(x: float, y: float, w: float = 0, h: float = 0) -> None:
xs.extend((x, x + w))
ys.extend((y, y + h))

for match in TAG_RE.finditer(text):
values = attrs(match.group(1))
try:
if "x" in values and "y" in values:
add_box(
number(values["x"]),
number(values["y"]),
number(values.get("width")),
number(values.get("height")),
)
if "cx" in values and "cy" in values:
radius = number(values.get("r"), number(values.get("rx")))
ry = number(values.get("ry"), radius)
add_box(number(values["cx"]) - radius, number(values["cy"]) - ry, radius * 2, ry * 2)
except ValueError:
continue

for match in re.finditer(r'\bpoints="([^"]+)"', text):
nums = [float(item) for item in re.findall(r"-?\d+(?:\.\d+)?", match.group(1))]
for index in range(0, len(nums) - 1, 2):
add_box(nums[index], nums[index + 1])

for match in re.finditer(r"<line\b([^>]*)/?>", text):
values = attrs(match.group(1))
try:
if {"x1", "y1", "x2", "y2"} <= values.keys():
add_box(number(values["x1"]), number(values["y1"]))
add_box(number(values["x2"]), number(values["y2"]))
except ValueError:
continue

for match in re.finditer(r"<text\b([^>]*)>(.*?)</text>", text, re.S):
values = attrs(match.group(1))
try:
x = number(values.get("x"))
y = number(values.get("y"))
width = number(values.get("width"))
size = number(values.get("font-size", "").removesuffix("px"), 16)
except ValueError:
continue
lines = max(1, len(re.findall(r"<tspan\b", match.group(2))))
height = size * 1.25 * lines
anchor = values.get("text-anchor", "start")
if anchor == "middle":
add_box(x - width / 2, y - size, width, height + size)
elif anchor == "end":
add_box(x - width, y - size, width, height + size)
else:
add_box(x, y - size, width, height + size)

if not xs or not ys:
print("no geometry to crop", file=sys.stderr)
return 1

min_x, max_x = min(xs) - PAD, max(xs) + PAD
min_y, max_y = min(ys) - PAD, max(ys) + PAD
width = max_x - min_x
height = max_y - min_y
opening = (
'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" '
'xmlns:xlink="http://www.w3.org/1999/xlink" '
f'width="{width:.2f}" height="{height:.2f}" '
f'viewBox="{min_x:.2f} {min_y:.2f} {width:.2f} {height:.2f}">'
f'<rect x="{min_x:.2f}" y="{min_y:.2f}" width="{width:.2f}" height="{height:.2f}" fill="#ffffff"/>'
)
text, count = re.subn(r"<svg\b[^>]*>", opening, text, count=1)
if count != 1:
print("missing svg root", file=sys.stderr)
return 1
out = Path(sys.argv[3])
out.write_text(text)
print(f"embedded {embedded} files {len(files)} missing {len(missing)}")
if missing:
print("missing " + " ".join(missing))
print(f"viewBox {min_x:.2f} {min_y:.2f} {width:.2f} {height:.2f}")
return 0


if __name__ == "__main__":
raise SystemExit(main())
50 changes: 50 additions & 0 deletions .agents/skills/confluence-whiteboard-export/scripts/extract_svg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env python3
"""Pull a real SVG document out of a nested getConfluenceContent payload."""

import json
import sys
from pathlib import Path


def find_svg(node):
if isinstance(node, str):
stripped = node.strip()
if stripped[:1] in "{[\"'":
try:
return find_svg(json.loads(stripped))
except json.JSONDecodeError:
pass
if "<svg" in node and "</svg>" in node and '\\"' not in node[:400]:
start = node.find("<svg")
end = node.rfind("</svg>")
return node[start : end + len("</svg>")]
return None
if isinstance(node, dict):
for value in node.values():
found = find_svg(value)
if found:
return found
if isinstance(node, list):
for value in node:
found = find_svg(value)
if found:
return found
return None


def main() -> int:
if len(sys.argv) != 3:
print("usage: extract_svg.py <tool-output> <out.svg>", file=sys.stderr)
return 2
raw = Path(sys.argv[1]).read_text()
svg = find_svg(raw) or ""
if "<svg" not in svg or "</svg>" not in svg or '\\"' in svg[:400]:
print("no decoded svg", file=sys.stderr)
return 1
Path(sys.argv[2]).write_text(svg)
print(Path(sys.argv[2]).stat().st_size)
return 0


if __name__ == "__main__":
raise SystemExit(main())
33 changes: 33 additions & 0 deletions .agents/skills/test-t3-app/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ repository root and retain its terminal session. Use the worktree's ignored
`.t3` state and read the actual ports and pairing URL from the dev-runner output.
Never run against `~/.t3/userdata` or set `VITE_HTTP_URL` or `VITE_WS_URL`.

The worktree-local default deliberately outranks an ambient `T3CODE_HOME`; do
not pass the shared home through to a worktree dev server. Ports can shift when
occupied — always read the actual values from the `[dev-runner]` line. Do not
pass `--browser` during automated testing: an automatically opened page can
consume the one-time bootstrap token before the controlled browser uses it.

Test with meaningful project and thread data. Read
[references/sqlite-fixtures.md](references/sqlite-fixtures.md) only when
inspecting or seeding SQLite. Stop the test server before direct fixture writes.
Expand Down Expand Up @@ -47,6 +53,33 @@ Navigate to the complete startup pairing URL once with
If the token was consumed or expired, run `node apps/server/src/bin.ts pair`
for a fresh one. Keep using the same tab.

Tokens from `pair` carry standard client scopes. The startup pairing URL carries
admin scopes; if the user needs Settings → Connections management (`access:write`),
restart the server and hand over the new startup URL instead.

### Previewing the dev server from a remote client

When T3 itself is being driven from another machine — the app connected to this environment over a
tailnet or LAN address rather than `localhost` — a dev server bound to loopback is not reachable at
that address just because the hostname is. Opening it does **not** require `--share`: the
environment resolves the port on demand, reusing an existing `tailscale serve` route, using the
environment's own address when the port already answers there, and otherwise publishing a
tailnet-only HTTPS route for the port and withdrawing it when the dev server exits.

Give the preview a `localhost:<port>` URL and let it resolve. Never hand-write the environment's
hostname with the dev port appended — that is the shape that fails, because nothing promises the
dev port is published under the same number or scheme.

If the port cannot be made reachable, the preview reports why and what to do (dev server not
running, tailscale not logged in, no permission to manage routes, tailnet port already taken).
Treat that message as the result; do not retry the same URL.

### Verify a shared environment before human handoff

When another person will use the printed pairing URL, first open the shared origin without the pairing path or fragment in the controlled browser and confirm the T3 Code app loads. This browser navigation is required even when curl succeeds because browsers block some otherwise reachable ports before making a network request.

Do not open the other person's complete pairing URL during this reachability check; doing so consumes its one-time token. If the agent also needs an authenticated browser, create and consume a separate pairing token, then leave a fresh token for the other person.

## Verify and retain

Exercise the affected flow and capture the state that proves it works. Keep
Expand Down
11 changes: 11 additions & 0 deletions .agents/skills/test-t3-mobile/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ repository root, retain its terminal session, and read the actual backend port
from the dev-runner output. Use the worktree's ignored `.t3` state. Never run
against `~/.t3/userdata`. The Browser panel is not required for this workflow.

The worktree-local default deliberately outranks an ambient `T3CODE_HOME`. When
testing web and mobile together, run `vp run dev --home-dir <base-dir> --host 127.0.0.1`
instead and do not launch a second backend over the same base directory.

Test with meaningful project and thread data. Read the shared
[SQLite fixture reference](../test-t3-app/references/sqlite-fixtures.md) only
when inspecting or seeding SQLite. Stop the test server before fixture writes.
Expand Down Expand Up @@ -53,6 +57,10 @@ against Metro). Without a cached build for this checkout it builds first, which
outlast the lease, so run `vp run mobile:install <ios|android> --prepare` (with
the same `--abi`) before you open the device.

The development identity is `T3 Code Dev`, bundle/package `com.t3tools.t3code.dev`,
scheme `t3code-dev`. If a build fails, investigate the error and fix local
prerequisites rather than reporting “no compatible client.”

Start `vp run dev:client` from `apps/mobile`, or reuse a healthy Metro belonging
to this checkout. Open its printed development-client URL with AgentDevice
`open com.t3tools.t3code.dev <url>` and all returned target arguments.
Expand All @@ -78,6 +86,9 @@ through AgentDevice. For a backend on the device host, use
`http://127.0.0.1:<server-port>` on iOS or `http://10.0.2.2:<server-port>`
on Android. For a remote backend, use its reachable origin.

Always enter the complete `http://` origin; the mobile host field otherwise
assumes HTTPS.

Confirm the intended projects appear, exercise the affected flow, and capture
evidence. Retain the app and environment while iterating. At teardown, remove
the disposable connection, close the AgentDevice session, call `device_close`,
Expand Down
Loading
Loading