Skip to content

feat(links): stable web links next to deep links (#3) - #9

Merged
RGB-loop merged 1 commit into
mainfrom
feat-stable-http-links
Oct 17, 2026
Merged

RGB-loop merged 1 commit into
mainfrom
feat-stable-http-links

Conversation

@RGB-loop

Copy link
Copy Markdown
Owner

Follow-up to #6 for issue #3 ("把搜索到的文件链接集成到自己的笔记中").

Deep links (vixel://open?…) only open on machines with Vixel installed, so they don't help when notes are read on a phone or in a web-based note app. This adds stable web links next to them.

  • Copy Web Link / Copy Markdown with Thumbnail — desktop: right-click menu and inspector, shown when the Local API is running (LAN address preferred when LAN access is on); NAS / web UI: inspector buttons.
  • Link form http://<host>:<port>/open?hash=…&video=…&t=… — same params as the deep link, addressed by content hash, so it survives re-indexing. The web UI resolves it via a shared resolveLink service method (desktop main now uses the same one), opens the item and seeks the video. Signed-out visits redirect to /login?next=… and come back (same-site paths only; //x and /\x rejected).
  • Markdown embed uses a new hash-addressed thumbnail route /media/thumbh/<hash> (auth required like all media).
  • MCP: httpUrl is now the page link; the raw file moved to mediaUrl.
  • Clipboard: falls back to execCommand('copy') in non-secure contexts (plain-http NAS).
  • Fix: resolving a link by video id looked up the representative by the video file hash, which never matches (link hashes are the representative frame's) — now by video id.

Verified (live): server edition: signed-out /open → 302 to login with next → after login lands on seagull-chicks.mp4 at 0:32 with the 0:32–0:45 segment highlighted, URL cleaned to /; /media/thumbh/<hash> 200 image/webp, unknown hash 404, unauthenticated 401; next=//evil.com and next=/\evil.com → /. Desktop dev with Local API on: inspector shows the two new buttons; copied http://127.0.0.1:41798/open?hash=…&video=3 and the Markdown thumbnail embed both load. npm test 395 passed, typecheck (node/web/server) clean.

…#3)

Deep links only open on machines with Vixel installed; the issue asked for a network
service so search results can live in notes. With the Local API on (or in the NAS web
UI), Copy Web Link / Copy Markdown with Thumbnail give http://<host>:<port>/open?hash=…&t=…,
addressed by content hash like deep links: the web UI resolves it (resolveLink, now shared
by desktop and server), opens the item and seeks video; signed-out visits go through login
and back (same-site next only). Markdown embeds /media/thumbh/<hash>. MCP httpUrl is now
this page link, raw file as mediaUrl. Clipboard falls back to execCommand on plain-http NAS.

Also fixes the video-id fallback when resolving links: link hashes are the representative
frame's, so look up the representative by video id instead of the video file hash.
@RGB-loop
RGB-loop merged commit 57aeb69 into main Oct 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant