fix(cards): give a link-titled card a readable name at once - #81
Merged
Conversation
Creating a card from a pasted GitHub link left the raw URL on screen: the create blocked on a GitHub round trip to fetch the item's title, so the optimistic card sat there as a URL for seconds — long enough that people reloaded the page to get a readable name. The create no longer waits on GitHub. It answers immediately under the same readable 'Pull: owner/repo#N' fallback the server already used for unresolvable links, and a background pass fetches the real title and renames the card. Two guards keep that honest: a card retitled by a person (or an agent) meanwhile is left alone, and the rename is marked unattributed so its watch frame reaches the creating tab too instead of being echo-suppressed into invisibility. The client mirrors the same label in its optimistic card, so the raw URL never shows even for the length of the create. Assisted-By: Claude Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
kvaps
marked this pull request as ready for review
July 27, 2026 12:06
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.
Problem
Creating a card from a pasted GitHub link left the raw URL on screen, and people reloaded the page to get a readable name. Reported as: «когда пользователь копирует ссылку в название карточки она превращается в осмысленное название не сразу, а после перезагрузки страницы».
Two causes stacked up:
Fix
The create no longer waits on GitHub. It answers immediately under the same readable
Pull: owner/repo#Nfallback the server already used for unresolvable links, and a background pass fetches the real title and renames the card (measured on a dev board: fallback at once, real title ~1s later).Two guards keep that honest:
board.Unattributed, and the watch layer broadcasts it to everyone.The client mirrors the same label (
optimisticTitle, the TS twin ofboard.Link.FallbackTitle) in every optimistic card — Me zones, Team grid, weekly plan and both subtask forms — so the raw URL never shows, not even for the length of the create.The background work is detached from the request (
context.WithoutCancel+ a 30s timeout), and its launch point is a swappablespawnso tests run it inline.Testing
TestCreateCardFromGitHubURL— create answers under the fallback, the background pass renames to the real title.TestCreateCardFromURLKeepsUserRename— a card retitled before the resolve lands keeps the person's wording; no rename call is made.TestUnattributedWorkIsNotEchoSuppressed— unattributed work carries no origin, so nothing is echo-suppressed.TestAPICreateCardFromGitHubURL— end-to-end over HTTP: instant fallback, then the resolved title.optimisticTitle(PR URL, issue URL,owner/repo#Nshorthand, and leaving the user's own wording alone).