Preserve absolute media file paths#3845
Merged
louis030195 merged 2 commits intoJun 7, 2026
Merged
Conversation
louis030195
reviewed
Jun 5, 2026
louis030195
left a comment
Collaborator
There was a problem hiding this comment.
nice, unix paths are tricky
generated by the screenpipe pr-review pipe (https://screenpi.pe), not written by a human — reply and tag @louis030195 if it got something wrong.
|
|
||
| cleaned = cleaned.replace(/^file:\/+/i, ""); | ||
| if (/^file:\/\/\/[A-Z]:[\\/]/i.test(cleaned)) { | ||
| cleaned = cleaned.replace(/^file:\/\/\//i, ""); |
Collaborator
There was a problem hiding this comment.
maybe cleaned.replace(/^file:/+/i, "/") for unix to handle any slash count?
louis030195
reviewed
Jun 6, 2026
louis030195
left a comment
Collaborator
There was a problem hiding this comment.
lgtm! tests pass nicely
generated by the screenpipe pr-review pipe (https://screenpi.pe), not written by a human — reply and tag @louis030195 if it got something wrong.
louis030195
pushed a commit
that referenced
this pull request
Jun 7, 2026
Strengthens the unit suites for the three Tier-1 fixes just merged: - media-file-path (#3845): malformed percent-escapes, no-extension / empty / backtick inputs, case-insensitive ext, Windows forward-slash path in text, Unix audio-chunk path with spaces+parens; audio/media classifier casing; already-wrapped markdown link, > escaping, Windows path in a markdown link. - context-pruning (#3854): malformed <conversation_history> blocks (unterminated, close-before-open) fall back to generic head+tail; multiple oversized text blocks clamped while non-text blocks untouched; non-string/non-array message content ignored; zero window from getContextUsage falls back to default. - notification-toggle (#3794): notify rule detected across a blank line in the deny block; enable keeps permissions+allow children when only the notify deny rule existed; deny block retained when a non-notify rule remains. Test-only. Full vitest suite green (486 tests). These functions are pure modules; the wdio e2e suite mocks pi and drives whole-app UI, so the deterministic edge-case layer for them is vitest (the context-pruning suite is already documented as the extension's real e2e coverage). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
normalizeMediaFilePathfile:///Users/...URLsChanged area
apps/screenpipe-app-tauri/lib/utils/media-file-path.tsapps/screenpipe-app-tauri/lib/utils/media-file-path.test.tsValidation
vet "Fix normalizeMediaFilePath so quoted file URLs and absolute Unix media paths normalize correctly" --agentic --agent-harness claude --history-loader "python3 ~/.codex/skills/vet/scripts/export_codex_session.py --session-file /Users/isaac.sanchez/.codex/sessions/2026/06/05/rollout-2026-06-05T09-01-02-019e97df-6c2f-73a0-826d-f4565aa6426d.jsonl"(initial run returnedNo issues found; later rerun hung with no findings emitted)node --experimental-strip-types --input-type=moduleassertion check covering absolute Unix paths, Unixfile:///...URLs, quoted Unix file URLs, and encoded Windows file URLsgit diff --checkRisk notes
Skipped-test rationale
bun x vitest run --config vitest.config.ts lib/utils/media-file-path.test.tswas blocked byerror: bun is unable to write files to tempdir: PermissionDeniedbun run typecheckwas blocked by the same Bun tempdir permission error