Skip to content

Use UrlPathPrefix for agent-skill learn-more link#2908

Merged
theletterf merged 3 commits intomainfrom
fix/agent-skill-url-prefix
Mar 16, 2026
Merged

Use UrlPathPrefix for agent-skill learn-more link#2908
theletterf merged 3 commits intomainfrom
fix/agent-skill-url-prefix

Conversation

@theletterf
Copy link
Contributor

@theletterf theletterf commented Mar 16, 2026

Summary

  • Computes the agent-skill "Learn more" link URL from block.Build.UrlPathPrefix so it resolves correctly in all environments (production, preview builds, local).
  • Adds a LearnMoreUrl property to AgentSkillViewModel, set by the renderer using the same prefix mechanism as GlobalLayoutViewModel.Link().

Test plan

  • All unit tests pass (./build.sh unit-test — 301 F# + 1524 C# passed, 0 failed).
  • Verify the learn-more link resolves correctly in a preview environment.

theletterf and others added 2 commits March 16, 2026 15:06
The hardcoded /explore-analyze/ai-features/agent-skills link didn't
resolve in preview environments where the URL path has a prefix.
Now computed from block.Build.UrlPathPrefix like other internal links.

Co-authored-by: Claude <noreply@anthropic.com>
Made-with: Cursor
Simpler than UrlPathPrefix computation and works correctly in all
environments (production, preview, local).

Co-authored-by: Claude <noreply@anthropic.com>
Made-with: Cursor
@theletterf theletterf requested a review from a team as a code owner March 16, 2026 14:11
@theletterf theletterf requested a review from technige March 16, 2026 14:11
@theletterf theletterf self-assigned this Mar 16, 2026
@theletterf theletterf added the fix label Mar 16, 2026
Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do believe we expose each environments prefix on the root view model

Compute the learn-more URL from block.Build.UrlPathPrefix so it
resolves correctly in all environments (production, preview, local).

Co-authored-by: Claude <noreply@anthropic.com>
Made-with: Cursor
@theletterf theletterf changed the title Use absolute URL for agent-skill learn-more link Use UrlPathPrefix for agent-skill learn-more link Mar 16, 2026
@theletterf
Copy link
Contributor Author

@Mpdreamz You're right, let's stay classy :D

Remade it in b1d45c5

@theletterf theletterf requested a review from Mpdreamz March 16, 2026 14:41
@theletterf theletterf enabled auto-merge (squash) March 16, 2026 14:46
@theletterf theletterf merged commit 1797e4a into main Mar 16, 2026
28 checks passed
@theletterf theletterf deleted the fix/agent-skill-url-prefix branch March 16, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants