Skip to content

feat: Internal document links in LinkPopup with ref:// navigation#10638

Open
PabloSergi wants to merge 1 commit intohcengineering:developfrom
PabloSergi:feature/link-popup-document-only-v2
Open

feat: Internal document links in LinkPopup with ref:// navigation#10638
PabloSergi wants to merge 1 commit intohcengineering:developfrom
PabloSergi:feature/link-popup-document-only-v2

Conversation

@PabloSergi
Copy link

@PabloSergi PabloSergi commented Mar 14, 2026

Summary

Hey team! I'm not a great developer by any means, but I'm absolutely certain this feature is critically needed for your project. It's a small change, but without it the platform falls significantly behind Notion — it's about internal document links with quick navigation.

Right now you can only insert URL links in the editor, which is really limiting. Together with Claude Code, I implemented the ability to search for internal documents right in the Link popup and jump between them via ref:// links.

I realize this is probably not the cleanest code — I know C# at a decent level but I'm really not familiar with frontend development, especially Svelte and the rest of the stack. Please take a look at this PR, maybe someone on your team can quickly refactor it and integrate it into production. This feature is incredibly important for building an internal wiki from Documents. I honestly don't know why this hasn't been implemented yet, but it would be amazing if you could finish this up.

Changes

  • LinkPopup.svelte: Search internal documents by title (using findAll with document.class.Document) instead of only accepting URLs. Selecting a document generates a ref:// link
  • linkKeymap.ts: Handle ref:// link clicks — navigate internally instead of opening a new tab
  • common-kit.ts: Register ref:// as a valid protocol in TipTap Link extension
  • package.json: Add @hcengineering/document dependency to text-editor-resources

Test plan

  • Open any document, select text, press the Link button (or Ctrl+K)
  • Type a document name — verify only Documents appear (no tasks, cards, templates)
  • Click a search result — verify it inserts a ref:// link
  • Click the inserted link — verify it navigates to the document internally without opening a new tab
  • Verify regular URL links still work as before

🤖 Generated with Claude Code

@huly-github-staging
Copy link

Connected to Huly®: UBERF-15899

…tion

LinkPopup now searches only documents (using findAll with document.class.Document)
instead of all object types. Clicking a result generates a ref:// link.
The link click handler navigates internally for ref:// URLs.
Register ref:// protocol in TipTap Link extension.

This code was written with Claude Code as a proof-of-concept. I'm not a frontend
developer and not familiar with Svelte — this is just an example solution for
internal document linking. Feel free to refactor as needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Pavel Sergeev <pmsergeev@gmail.com>
@PabloSergi PabloSergi force-pushed the feature/link-popup-document-only-v2 branch from ce060fb to d6c9fea Compare March 14, 2026 09:45
@ArtyomSavchenko
Copy link
Member

Hi @PabloSergi ,
Thanks for the contribution.
The build is failed at the moment: CI / build (pull_request) .
Could you try to perform rush update and commit updated lock file?

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.

2 participants