* [PATCH b4] review: Fix sashiko patchset URL format
@ 2026-04-29 9:54 Sven Eckelmann
2026-04-29 10:13 ` Matthieu Baerts
0 siblings, 1 reply; 3+ messages in thread
From: Sven Eckelmann @ 2026-04-29 9:54 UTC (permalink / raw)
To: Kernel.org Tools; +Cc: Konstantin Ryabitsev, 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.
Fixes: 5154a8c9934c ("review: integrate sashiko and follow-up inline comments")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
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(-)
diff --git a/src/b4/review/checks.py b/src/b4/review/checks.py
index 36c0780..51378a9 100644
--- a/src/b4/review/checks.py
+++ b/src/b4/review/checks.py
@@ -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] = {}
diff --git a/src/tests/test_review_checks.py b/src/tests/test_review_checks.py
index 1469bf3..9a43a76 100644
--- a/src/tests/test_review_checks.py
+++ b/src/tests/test_review_checks.py
@@ -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='patch1@example.com')
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,
--
Sven Eckelmann <sven@narfation.org>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH b4] review: Fix sashiko patchset URL format
2026-04-29 9:54 [PATCH b4] review: Fix sashiko patchset URL format Sven Eckelmann
@ 2026-04-29 10:13 ` Matthieu Baerts
2026-04-29 11:24 ` Sven Eckelmann
0 siblings, 1 reply; 3+ messages in thread
From: Matthieu Baerts @ 2026-04-29 10:13 UTC (permalink / raw)
To: Sven Eckelmann, Kernel.org Tools; +Cc: Konstantin Ryabitsev
Hi Sven,
On 29/04/2026 11:54, Sven Eckelmann wrote:
> 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/20260428-sashiko-patchset-api-v1-2-24d4ac34b4ae@kernel.org/T/#u
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH b4] review: Fix sashiko patchset URL format
2026-04-29 10:13 ` Matthieu Baerts
@ 2026-04-29 11:24 ` Sven Eckelmann
0 siblings, 0 replies; 3+ messages in thread
From: Sven Eckelmann @ 2026-04-29 11:24 UTC (permalink / raw)
To: Kernel.org Tools, Matthieu Baerts; +Cc: Konstantin Ryabitsev
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
On Wednesday, 29 April 2026 12:13:32 CEST Matthieu Baerts wrote:
> Hi Sven,
>
> On 29/04/2026 11:54, Sven Eckelmann wrote:
> > 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/20260428-sashiko-patchset-api-v1-2-24d4ac34b4ae@kernel.org/T/#u
Yes, your patch series looks better than my single patch.
Regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-29 11:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-29 9:54 [PATCH b4] review: Fix sashiko patchset URL format Sven Eckelmann
2026-04-29 10:13 ` Matthieu Baerts
2026-04-29 11:24 ` Sven Eckelmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox