Skip to content

fix: project list/search openInHarness URLs (org alias, nested project rows)#104

Draft
thisrohangupta wants to merge 1 commit into
mainfrom
cursor/fix-project-openinharness-0629
Draft

fix: project list/search openInHarness URLs (org alias, nested project rows)#104
thisrohangupta wants to merge 1 commit into
mainfrom
cursor/fix-project-openinharness-0629

Conversation

@thisrohangupta
Copy link
Copy Markdown
Collaborator

Description

Fixes malformed openInHarness links for harness_list / search on resource_type: project.

Root cause

  • The project deepLinkTemplate uses {org} and {project}, but the registry only populated orgIdentifier and projectIdentifier from the request scope, so {org} was left literal in the URL.
  • List rows that include a nested project: { identifier, name } object led to String(project)[object Object] in the path when that field was used as a placeholder.

Changes

  • After building link params, mirror orgIdentifierorg and projectIdentifierproject so short template names resolve.
  • Use a small scalarForDeepLink helper so only string/number/boolean values become placeholders; nested objects fall through to nested unwrapping instead of String(object).
  • Regression tests for nested list rows and flat identifier rows.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Checklist

  • Tests pass (Node/pnpm not available in this agent image; please run pnpm test tests/registry/registry.test.ts and pnpm typecheck locally)
  • Typecheck passes

Slack Thread

Open in Web Open in Cursor 

- Alias orgIdentifier/projectIdentifier to org/project for templates
- Avoid String() on nested API objects (prevents [object Object] in URLs)
- Add regression tests for nested project rows and flat identifiers

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants