review: Fix sashiko patchset URL format
PATCH 1/1 review: Fix sashiko patchset URL format
The sashiko server does not expose a direct /patch/{ps_id} endpoint. Requesting https://sashiko.dev/patch/93 returns a 404, because the frontend is a JavaScript single page application (SPA) that relies on the API to fetch and render content dynamically.
The correct approach is to load the root page and pass the resource as a URL fragment (anchor), e.g. https://sashiko.dev/#/patchset/93, so the SPA can query the API and display the patchset accordingly.
---
Just noticed this while playing around with the Check functionality of b4 review tui. I didn't actually ran the test suite.
--- src/b4/review/checks.py | 2 +- src/tests/test_review_checks.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
src/b4/review/checks.py +1 -1
@@ -462,7 +462,7 @@ def _run_builtin_sashiko(msg: EmailMessage, sashiko_url: str) -> List[Dict[str, reviews = data.get('reviews', []) patches = data.get('patches', []) base_url = sashiko_url.rstrip('/') - patchset_url = f'{base_url}/patch/{ps_id}' if ps_id else '' + patchset_url = f'{base_url}/#/patchset/{ps_id}' if ps_id else '' # Build a map from patch message-id to sashiko patch id patch_id_by_msgid: Dict[str, int] = {}
src/tests/test_review_checks.py +2 -2
@@ -861,7 +861,7 @@ class TestRunBuiltinSashiko: assert '1 critical' in results[0]['summary'] assert '1 high' in results[0]['summary'] assert '1 low' in results[0]['summary'] - assert results[0]['url'] == 'https://sashiko.dev/patch/93' + assert results[0]['url'] == 'https://sashiko.dev/#/patchset/93' # Details should be valid JSON details = json.loads(results[0]['details']) assert len(details) == 3 # 1 low + 1 critical + 1 high
@@ -992,7 +992,7 @@ class TestRunBuiltinSashiko: msg = _make_msg(msgid='[email protected]') results = checks._run_builtin_sashiko(msg, 'https://sashiko.dev/') # Trailing slash should not cause double slash - assert results[0]['url'] == 'https://sashiko.dev/patch/93' + assert results[0]['url'] == 'https://sashiko.dev/#/patchset/93' class TestSashikoAutoWire:
---
base-commit: d5d981426ead3f490713ef5d2fd1aa3d0f13b005
change-id: 20260429-sashiko-patchset-url-65ce710be1e0
Best regards,
Signature · 1 line
Sven Eckelmann <[email protected]>
Hi Sven,
Quoted 8 lines · Sven Eckelmann
The sashiko server does not expose a direct
/patch/{ps_id}endpoint. Requesting https://sashiko.dev/patch/93 returns a 404, because the frontend is a JavaScript single page application (SPA) that relies on the API to fetch and render content dynamically.The correct approach is to load the root page and pass the resource as a URL fragment (anchor), e.g. https://sashiko.dev/#/patchset/93, so the SPA can query the API and display the patchset accordingly.
Thank you for sharing this. It looks like your patch is similar to this one:
https://lore.kernel.org/tools/[email protected]/T/#u
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Quoted 8 lines · On Wednesday, 29 April 2026 12:13:32 CEST Matthieu Baerts wrote:
Hi Sven,
Quoted 5 lines · Sven Eckelmann
The sashiko server does not expose a direct
/patch/{ps_id}endpoint. Requesting https://sashiko.dev/patch/93 returns a 404, because the frontend is a JavaScript single page application (SPA) that relies on the API to fetch and render content dynamically.
Quoted 7 lines
Quoted 3 lines
The correct approach is to load the root page and pass the resource as a URL fragment (anchor), e.g. https://sashiko.dev/#/patchset/93, so the SPA can query the API and display the patchset accordingly.
Thank you for sharing this. It looks like your patch is similar to this one:
Yes, your patch series looks better than my single patch.
Regards,
Sven
Quoted 3 lines · Sven Eckelmann
Quoted 1 line
Yes, your patch series looks better than my single patch.
That's the one I took.
Much thanks to both of you!
-K