Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

feat: add /pdf shorthand to server mode strategies

Bosch126b37e23702
diff --git a/internal/strategy/autorestart/autorestart.go b/internal/strategy/autorestart/autorestart.go
index 4a058f93..b1b8be80 100644
--- a/internal/strategy/autorestart/autorestart.go
+++ b/internal/strategy/autorestart/autorestart.go
@@ -146,7 +146,7 @@ func (s *Strategy) RegisterRoutes(mux *http.ServeMux) {
s.orch.RegisterHandlers(mux)
shorthandRoutes := []string{
- "GET /snapshot", "GET /screenshot", "GET /text",
+ "GET /snapshot", "GET /screenshot", "GET /text", "GET /pdf", "POST /pdf",
"POST /navigate", "POST /action", "POST /actions",
"POST /tab", "POST /tab/lock", "POST /tab/unlock",
"GET /cookies", "POST /cookies",
diff --git a/internal/strategy/explicit/explicit.go b/internal/strategy/explicit/explicit.go
index 1f30cab3..1ecdc558 100644
--- a/internal/strategy/explicit/explicit.go
+++ b/internal/strategy/explicit/explicit.go
@@ -42,7 +42,7 @@ func (s *Strategy) RegisterRoutes(mux *http.ServeMux) {
// Shorthand endpoints proxy to first running instance.
shorthandRoutes := []string{
- "GET /snapshot", "GET /screenshot", "GET /text",
+ "GET /snapshot", "GET /screenshot", "GET /text", "GET /pdf", "POST /pdf",
"POST /navigate", "POST /action", "POST /actions",
"POST /tab", "POST /tab/lock", "POST /tab/unlock",
"GET /cookies", "POST /cookies",
diff --git a/internal/strategy/simple/simple.go b/internal/strategy/simple/simple.go
index 4973f05b..e84e9e6f 100644
--- a/internal/strategy/simple/simple.go
+++ b/internal/strategy/simple/simple.go
@@ -50,7 +50,7 @@ func (s *Strategy) RegisterRoutes(mux *http.ServeMux) {
// Shorthand endpoints — all proxy to first running instance.
shorthandRoutes := []string{
- "GET /snapshot", "GET /screenshot", "GET /text",
+ "GET /snapshot", "GET /screenshot", "GET /text", "GET /pdf", "POST /pdf",
"POST /navigate", "POST /action", "POST /actions",
"POST /tab", "POST /tab/lock", "POST /tab/unlock",
"GET /cookies", "POST /cookies",
diff --git a/tests/e2e/scenarios/06-screenshot-pdf.sh b/tests/e2e/scenarios/06-screenshot-pdf.sh
index ec4c84a4..c6621673 100755
--- a/tests/e2e/scenarios/06-screenshot-pdf.sh
+++ b/tests/e2e/scenarios/06-screenshot-pdf.sh
@@ -14,6 +14,14 @@ assert_ok "screenshot"
end_test
+# ─────────────────────────────────────────────────────────────────
+start_test "pinchtab pdf (default)"
+
+pt_get /pdf
+assert_ok "pdf"
+
+end_test
+
# ─────────────────────────────────────────────────────────────────
start_test "pinchtab screenshot --tab <id>"