commits
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: HigherOrderLogic <73709188+HigherOrderLogic@users.noreply.github.com>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Seongmin Lee <git@boltless.me>
Signed-off-by: Lewis <lewis@tangled.org>
Signed-off-by: Lewis <lewis@tangled.org>
Fall back to parsing the shebang line for extensionless scripts,
enabling highlighting for files like nushell/python/bash scripts
that lack a file extension.
Signed-off-by: Niclas Overby <niclas@overby.me>
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: Lewis <lewis@tangled.org>
Signed-off-by: Lewis <lewis@tangled.org>
Signed-off-by: Lewis <lewis@tangled.org>
Signed-off-by: Lewis <lewis@tangled.org>
Signed-off-by: Lewis <lewis@tangled.org>
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: Lewis <lewis@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: oppiliappan <me@oppi.li>
🤑📈
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Compares the incoming host to the domain in the KV map, and fetches the
relevant site from R2. Written in Rust, compiled to wasm using
`worker-build`.
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
wip: repo pages settings and cf r2/kv setup
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Orphaned `sh.tangled.string` records on users' PDSs cannot be cleaned up
by the appview and they would need to be removed manually by each user.
Signed-off-by: Youn Mélois <youn@melois.dev>
Add support for AVIF, JPEG XL, and HEIF image formats across the stack:
- knotserver/xrpc: override MIME types for formats that Go's
http.DetectContentType does not recognize (.avif, .jxl, .heic, .heif),
using a switch statement like the existing .svg override
- camo: add image/avif, image/heif, and image/jxl to the allowed MIME
types list
- appview/repo: add .avif, .jxl, .heic, .heif to the image extension
list in the blob viewer
Without these changes, AVIF files (and other modern formats) are rejected
by the knot server with a 403 (detected as application/octet-stream),
blocked by the camo proxy with a 415, and not previewed in the blob viewer.
Signed-off-by: Niclas Overby <niclas@overby.me>
Both policies were rebuilt on every NewSanitizer() call. This included
compiling the chroma syntax-highlight class regex by iterating
chroma.StandardTypes and joining ~200 type names into a regex alternation,
on every invocation — including from inside the pull request HTTP handler,
making it a per-request cost.
Move both policies to package-level vars initialized once in init().
NewSanitizer() is now a pair of pointer assignments. This is safe per the
bluemonday README: "it is safe to use the policy in multiple goroutines".
Signed-off-by: Matías Insaurralde <matias@insaurral.de>
Signed-off-by: oppiliappan <me@oppi.li>
The devshell copied assets from the Nix store with preserved mode
bits, which left files in appview/pages/static read-only and caused
repeated cp permission errors on subsequent nix develop runs.
Stop preserving mode so generated static files remain writable across
shell entries.
AI-assisted: OpenCode (openai/gpt-5.3-codex)
Signed-off-by: Alessio Caiazza <code.git@caiazza.info>
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: oppiliappan <me@oppi.li>
The appview crashes on startup if Redis is not running:
appview: failed to start appview err="failed to start oauth handler:
failed to connect to redis: dial tcp [::1]:6379: connect: connection refused"
Reorder the "Running the appview" section so the Redis and
OAuth JWKs prerequisites come before the watch-appview command,
matching the actual dependency order.
Signed-off-by: Alessio Caiazza <code.git@caiazza.info>
Signed-off-by: Evan Jarrett <evan@evanjarrett.com>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
do not refresh after token expiry, do it before
Signed-off-by: oppiliappan <me@oppi.li>
Signed-off-by: oppiliappan <me@oppi.li>
Move blobPattern, treePattern, and pathAfterRefRE to package-level
vars so they are compiled once and reused across GetRepoInfo and
path resolution calls instead of recompiling on every request.
Signed-off-by: Matías Insaurralde <matias@insaurral.de>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Compares the incoming host to the domain in the KV map, and fetches the
relevant site from R2. Written in Rust, compiled to wasm using
`worker-build`.
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
wip: repo pages settings and cf r2/kv setup
Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>
Add support for AVIF, JPEG XL, and HEIF image formats across the stack:
- knotserver/xrpc: override MIME types for formats that Go's
http.DetectContentType does not recognize (.avif, .jxl, .heic, .heif),
using a switch statement like the existing .svg override
- camo: add image/avif, image/heif, and image/jxl to the allowed MIME
types list
- appview/repo: add .avif, .jxl, .heic, .heif to the image extension
list in the blob viewer
Without these changes, AVIF files (and other modern formats) are rejected
by the knot server with a 403 (detected as application/octet-stream),
blocked by the camo proxy with a 415, and not previewed in the blob viewer.
Signed-off-by: Niclas Overby <niclas@overby.me>
Both policies were rebuilt on every NewSanitizer() call. This included
compiling the chroma syntax-highlight class regex by iterating
chroma.StandardTypes and joining ~200 type names into a regex alternation,
on every invocation — including from inside the pull request HTTP handler,
making it a per-request cost.
Move both policies to package-level vars initialized once in init().
NewSanitizer() is now a pair of pointer assignments. This is safe per the
bluemonday README: "it is safe to use the policy in multiple goroutines".
Signed-off-by: Matías Insaurralde <matias@insaurral.de>
The devshell copied assets from the Nix store with preserved mode
bits, which left files in appview/pages/static read-only and caused
repeated cp permission errors on subsequent nix develop runs.
Stop preserving mode so generated static files remain writable across
shell entries.
AI-assisted: OpenCode (openai/gpt-5.3-codex)
Signed-off-by: Alessio Caiazza <code.git@caiazza.info>
The appview crashes on startup if Redis is not running:
appview: failed to start appview err="failed to start oauth handler:
failed to connect to redis: dial tcp [::1]:6379: connect: connection refused"
Reorder the "Running the appview" section so the Redis and
OAuth JWKs prerequisites come before the watch-appview command,
matching the actual dependency order.
Signed-off-by: Alessio Caiazza <code.git@caiazza.info>