A malformed file image URL breaks transcript rendering
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
# Bugs
|
# Bugs
|
||||||
|
|
||||||
- A malformed file image URL breaks transcript rendering
|
|
||||||
`decodeURI` throws on e.g. `file:///tmp/100%.png` (`web/src/markdown.ts:347`), and `renderAll` appends events before mounting the composer (`web/src/task.ts:608–609`), so the rest of the transcript and the composer don't render. Catch the decode error and render the plain fallback link.
|
|
||||||
- operations.md describes two incompatible event-stream designs
|
- operations.md describes two incompatible event-stream designs
|
||||||
`docs/operations.md:320–324` says selecting tasks opens dedicated SSE streams, which is stale against `web/src/state.ts:309–340`, `:401–414`, and says only `agent.delta` is transient though `admin.health` is too. Rewrite the Events section to match the current two-stream feed design, and qualify the transaction/event guarantee at `docs/operations.md:7` for internal bookkeeping writes.
|
`docs/operations.md:320–324` says selecting tasks opens dedicated SSE streams, which is stale against `web/src/state.ts:309–340`, `:401–414`, and says only `agent.delta` is transient though `admin.health` is too. Rewrite the Events section to match the current two-stream feed design, and qualify the transaction/event guarantee at `docs/operations.md:7` for internal bookkeeping writes.
|
||||||
|
|
||||||
|
|||||||
Vendored
+6
-1
@@ -311,7 +311,12 @@ function worktreeImageURL(path, taskId) {
|
|||||||
}
|
}
|
||||||
let file = path;
|
let file = path;
|
||||||
if (/^file:\/\//i.test(file)) {
|
if (/^file:\/\//i.test(file)) {
|
||||||
file = decodeURI(file.slice("file://".length));
|
try {
|
||||||
|
file = decodeURI(file.slice("file://".length));
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (/^[a-z][a-z0-9+.-]*:/i.test(file)) {
|
else if (/^[a-z][a-z0-9+.-]*:/i.test(file)) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+5
-1
@@ -351,7 +351,11 @@ function worktreeImageURL(path: string, taskId: string | undefined): string | nu
|
|||||||
}
|
}
|
||||||
let file = path;
|
let file = path;
|
||||||
if (/^file:\/\//i.test(file)) {
|
if (/^file:\/\//i.test(file)) {
|
||||||
file = decodeURI(file.slice("file://".length));
|
try {
|
||||||
|
file = decodeURI(file.slice("file://".length));
|
||||||
|
} catch {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
} else if (/^[a-z][a-z0-9+.-]*:/i.test(file)) {
|
} else if (/^[a-z][a-z0-9+.-]*:/i.test(file)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user