feat(editor): render same-origin task links as task pills - #3544
Conversation
Preview DeploymentPreview deployments for this PR are available at:
The preview environment will start automatically on first visit. Subsequent pushes to this PR will update the Run locally with Dockerdocker pull ghcr.io/go-vikunja/vikunja:pr-3544
docker run -p 3456:3456 ghcr.io/go-vikunja/vikunja:pr-3544Last updated for commit 13fd9fe |
tink-bot
left a comment
There was a problem hiding this comment.
🤖 PR Swarm — automated review, round 1. See inline comments.
|
🤖 PR Swarm — automated review. Panel: bughunter · security · conventions · design · verifier — decision round @ 5d7b13d (+553/−480 this round, PR +1641/−327 after rebase onto main) Verdict: ✅ APPROVEDecision round: maintainer answered all 5 deferred items — 2 implemented here, 1 split into a follow-up PR, 2 accepted as-is. Branch rebased onto main (23 commits, no merge commit). Round 3 (before fixes): 4 MEDIUM on the round-2 refetch path (identity change kept stale task visible, no post-await race guard, failed refetch blanked pill, loader-injection shape) — all fixed. Round cap reached (3 rounds); remaining open items are the design/perf calls below. Rounds 1→3 grew the PR from +819 to +1260 (tests, helpers, cache lifecycle) — no core reshaping. ❓ Needs your input (0)All decided:
✅ Fixed this round (7)
💤 Resolved as nit (3)
🔎 Runtime verification (round 3, re-driven)
Reviewer summaries
Previous rounds (2)round 2 @ 1fdf443 — 💬 APPROVE WITH NITS: 9 fixed (identity-change cache clear, reactive invalidation, service-layer hooks, cache moved to helpers, a11y nits, pinia guard, shared link attrs, prop rename), 5 nits, 5 deferred. round 1 @ 23013ee — |
tink-bot
left a comment
There was a problem hiding this comment.
🤖 PR Swarm — automated review, round 2. See inline comments.
tink-bot
left a comment
There was a problem hiding this comment.
🤖 PR Swarm — automated review, round 3. See inline comments.
1aa9aef to
e265b45
Compare
5d7b13d to
3b3d44a
Compare
Recognises the current origin plus base path and the configured frontendUrl (comment permalinks, notification mails).
…glance tooltip TaskGlanceTooltip now teleports into an open <dialog> so it is visible above the task detail modal.
One request per task id shared by all consumers; 403/404 stay cached, transient failures are evicted. TaskService/TaskBucketService invalidate on update/delete, an auth-store watch clears the cache when the identity changes, and a version ref lets mounted consumers refetch. TimeEntryList resolves tasks through it instead of its own cache.
Same-origin task url anchors whose text equals their href are upgraded in memory to an inline atom node and serialized back to the same plain anchor, so stored HTML never carries special markup. The node view fetches the task through the shared cache and renders identifier, title, done state, a project prefix for foreign projects and the glance tooltip; 403/404 degrade to a plain link. Pasting a bare task url inserts a pill immediately.
…Extensions Registers TaskLink, shares the Link mark's HTMLAttributes with pasted pills, drops StarterKit's duplicate link/underline copies and renames the mentionProjectId prop to projectId since it now also provides the host project for task link pills.
…onfig Includes a paste-order test that fails without the explicit TaskLink priority over the markdown paste handler.
3b3d44a to
13fd9fe
Compare





Links to
/tasks/:idon own instance render as bare urls in descriptions and comments — no title, no done state, no way to tell what is behind them without clicking. Now: same-origin task url anchors (text == href) upgrade in-memory to inlinetaskLinknode rendered as pill (identifier, title, done state, project prefix when task lives in another project, glance tooltip on hover). Stored HTML stays plain<a href>, byte-stable on re-save. Links to tasks user cannot see (403/404) degrade to plain link. Pasting bare task url inserts pill immediately.Side fixes:
StarterKitno longer registers its ownlink/underlinecopies (duplicate Link hadopenOnClick: true, opened new tab when clicking link in edit mode);TaskGlanceTooltipteleports into open<dialog>so it is visible inside task detail modal.How to verify
http://localhost:4173/tasks/2).GET /api/v1/tasks/<A>) contains only<a href="...">...</a>, no custom markup.<a href="/tasks/2">see B</a>via the link toolbar) and a link to another origin's/tasks/1.