Repository navigation
trail: print the server's url for a project trail - #2793
Merged
Merged
Conversation
entire-api now answers url on project Trails and parent references. Decode it and show it under the header, so nothing has to compose a project Trail's page from its number. Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The changes are narrowly scoped, preserve behavior when URLs are absent, and have no identified blocking issues.
0 open findings
What changed in this PR
Adds server-provided URLs to project trail output, preserving existing behavior when no URL is returned.
Changes:
- Adds optional URL fields to project trail API models.
- Prints the URL in human-readable output and tests its display.
| File | Description |
|---|---|
| cmd/entire/cli/project_trail_cmd.go | Prints the sanitized URL when present. |
| cmd/entire/cli/project_trail_cmd_test.go | Verifies display of the server-provided URL. |
| cmd/entire/cli/api/project_trails.go | Adds optional URL fields to both API models. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
toothbrush
marked this pull request as ready for review
October 16, 2026 08:03
MuskanPaliwal
previously approved these changes
Oct 16, 2026
The parent reference's url now reaches the reader: trail.Metadata carries project_trail_url and the human view prints it as Project. A whitespace-only url is no url, matching trailDisplayURL. Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
"Project:" already names the project ID in the project view. The project view prints URL right after the title, where the repo view keeps its link. Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
Soph
approved these changes
Oct 17, 2026
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.
https://entire.io/gh/entireio/cli/trails/1590
Why
entire trail show --project …prints a project trail's number with no page link, so agents compose one from the number and the repository shape and land on a 404 (gh/entirehq/entiredb/trails/20289). entire-api now answersurlon project Trails, parent references and repository code work (https://entire.io/et/entirehq/entire-api/trails/392, deployed).What
api.ProjectTrail.URLandapi.TrailParentReference.URLdecode the new fields.entire trail show --project …printsURL: …right after theTrail #N:line when the server sent one; JSON output carries it as-is. A whitespace-only value counts as absent, astrailDisplayURLalready treats it.trail showandtrail listcarry the parent's page:trail.Metadata.ProjectTrailURL(project_trail_urlin JSON), printed asProject trail: …in the human view (Project:already names the project ID in the project view). That is the link agents guessed and 404'd on.url(trailDisplayURL); no change there.Verification
go build,go vet,mise run lint:goclean;go testoncmd/entire/cli,apiandtrailpasses withENTIRE_PROJECT_TRAILSunset (set, thetrail mergetests fail on main too, since that mode has nomerge). Tests:TestProjectTrailShowPrintsServerURL,TestProjectTrailShowOmitsURLWithoutOne(absent and whitespace), andprintTrailDetailsprintsProject trail:with a parent page and omits it without; both link lines are sanitized before printing.mise run lint:shellcheckfails onscripts/check-pr-binaries.sh(SC2312) on origin/main as well; untouched here.Note
Low Risk
Display and JSON deserialization only; behavior is unchanged when
urlis omitted.Overview
Adds optional
urlon project trail API models (ProjectTrailandTrailParentReference) so the server can return a canonical web link.trail show(and any command that uses human-readableprintProjectTrail) now prints aURL:line when the response includes it; JSON output picks up the field automatically. A test asserts the CLI shows the server-provided URL.Reviewed by Cursor Bugbot for commit f43851f. Configure here.