Skip to content

Adds an 'ide' url parameter for gk.dev links#4934

Open
sergeibbb wants to merge 2 commits intomainfrom
4905-add-ide-parameter-to-gkdev-links
Open

Adds an 'ide' url parameter for gk.dev links#4934
sergeibbb wants to merge 2 commits intomainfrom
4905-add-ide-parameter-to-gkdev-links

Conversation

@sergeibbb
Copy link
Member

@sergeibbb sergeibbb commented Jan 27, 2026

Description

Solves #4905

Checklist

  • I have followed the guidelines in the Contributing document
  • My changes follow the coding style of this project
  • My changes build without any errors or warnings
  • My changes have been formatted and linted
  • My changes include any required corresponding changes to the documentation (including CHANGELOG.md and README.md)
  • My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

@sergeibbb sergeibbb linked an issue Jan 27, 2026 that may be closed by this pull request
@sergeibbb sergeibbb marked this pull request as ready for review January 27, 2026 16:35
@augmentcode
Copy link

augmentcode bot commented Jan 27, 2026

🤖 Augment PR Summary

Summary: This PR updates gk.dev link generation to include an ide query parameter so gk.dev can identify the originating editor.

Changes:

  • Makes UrlsProvider.getGkDevUrl async and appends ide=... based on the host app name
  • Centralizes automatic injection of source=gitlens into gk.dev URLs (removing duplicated/manual additions)
  • Updates call sites to await the new async URL builder (auth, subscriptions, integrations, launchpad)
  • Adds getGkDevUrlWithoutIdeArg for cases where ide should be omitted (e.g., drafts)

Technical Notes: The IDE identifier comes from getHostAppName() and defaults to unknown when it can’t be determined.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@sergeibbb sergeibbb force-pushed the 4905-add-ide-parameter-to-gkdev-links branch from 936d004 to 0209c58 Compare January 27, 2026 16:54
@sergeibbb sergeibbb marked this pull request as draft January 27, 2026 16:57
@sergeibbb sergeibbb marked this pull request as ready for review January 27, 2026 16:57
Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

sergeibbb added a commit that referenced this pull request Jan 27, 2026
Updates `getGkDevUrl` to asynchronously fetch and include the host IDE
(e.g., VS Code) as an `ide` query parameter.

It should be used for all  register, connect, and upgrade flows.

Introduces `getGkDevUrlWithoutIdeArg` for cases where the `ide`
parameter is not required, such as draft URLs.

Updates all existing call sites to `await` the now-asynchronous
`getGkDevUrl` method. Refactors query parameter generation for `source`
and `ide` into dedicated helper methods for improved consistency.
(#4905, #4934)
sergeibbb added a commit that referenced this pull request Jan 27, 2026
Cleans up GitKraken-related URLs by removing the `source=gitlens` query
parameter from authentication, referral, and subscription management
flows. This parameter is substituted by `getGkDevUrl()` automatically.

(#4905, #4934)
@sergeibbb sergeibbb force-pushed the 4905-add-ide-parameter-to-gkdev-links branch from 0209c58 to d24cb30 Compare January 27, 2026 19:03
Comment on lines 50 to 58
async getGkDevUrl(pathSegments?: string | string[], query?: string | URLSearchParams): Promise<string> {
const ide = (await getHostAppName()) ?? 'unknown';
query = this.provideQueryWithIdeArg(query, ide);
query = this.provideQueryWithSourceArg(query);
const uri = this.buildGkDevUri(pathSegments, query);
return uri.toString(true);
}

getGkDevUrlWithoutIdeArg(pathSegments?: string | string[], query?: string | URLSearchParams): string {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we have two functions? Is there some technical reason we can't make it async in every case and just provide the option in the params to include IDE?

Copy link
Member Author

Choose a reason for hiding this comment

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

@axosoft-ramint

Yes, you're right.
ViewNode.getUrl supports both async and sync signatures, so I can just update it and it does not require massive changes.

Copy link
Member Author

Choose a reason for hiding this comment

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

sergeibbb added a commit that referenced this pull request Feb 2, 2026
Updates `getGkDevUrl` to asynchronously fetch and include the host IDE
(e.g., VS Code) as an `ide` query parameter.

It should be used for all  register, connect, and upgrade flows.

Introduces `getGkDevUrlWithoutIdeArg` for cases where the `ide`
parameter is not required, such as draft URLs.

Updates all existing call sites to `await` the now-asynchronous
`getGkDevUrl` method. Refactors query parameter generation for `source`
and `ide` into dedicated helper methods for improved consistency.
(#4905, #4934)
sergeibbb added a commit that referenced this pull request Feb 2, 2026
Cleans up GitKraken-related URLs by removing the `source=gitlens` query
parameter from authentication, referral, and subscription management
flows. This parameter is substituted by `getGkDevUrl()` automatically.

(#4905, #4934)
@sergeibbb sergeibbb force-pushed the 4905-add-ide-parameter-to-gkdev-links branch from d24cb30 to 8d61774 Compare February 2, 2026 16:06
sergeibbb added a commit that referenced this pull request Feb 2, 2026
Updates `getGkDevUrl` to asynchronously fetch and include the host IDE
(e.g., VS Code) as an `ide` query parameter.

It should be used for all  register, connect, and upgrade flows.

Introduces `getGkDevUrlWithoutIdeArg` for cases where the `ide`
parameter is not required, such as draft URLs.

Updates all existing call sites to `await` the now-asynchronous
`getGkDevUrl` method. Refactors query parameter generation for `source`
and `ide` into dedicated helper methods for improved consistency.
(#4905, #4934)
@sergeibbb sergeibbb force-pushed the 4905-add-ide-parameter-to-gkdev-links branch from 8d61774 to c7b8c20 Compare February 2, 2026 16:08
sergeibbb added a commit that referenced this pull request Feb 2, 2026
Cleans up GitKraken-related URLs by removing the `source=gitlens` query
parameter from authentication, referral, and subscription management
flows. This parameter is substituted by `getGkDevUrl()` automatically.

(#4905, #4934)
Updates `getGkDevUrl` to asynchronously fetch and include the host IDE
(e.g., VS Code) as an `ide` query parameter.

It should be used for all  register, connect, and upgrade flows.

Introduces `getGkDevUrlWithoutIdeArg` for cases where the `ide`
parameter is not required, such as draft URLs.

Updates all existing call sites to `await` the now-asynchronous
`getGkDevUrl` method. Refactors query parameter generation for `source`
and `ide` into dedicated helper methods for improved consistency.
(#4905, #4934)
Cleans up GitKraken-related URLs by removing the `source=gitlens` query
parameter from authentication, referral, and subscription management
flows. This parameter is substituted by `getGkDevUrl()` automatically.

(#4905, #4934)
@sergeibbb sergeibbb force-pushed the 4905-add-ide-parameter-to-gkdev-links branch from c7b8c20 to fdf0658 Compare February 2, 2026 16:15
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.

Add an 'ide' url parameter for gk.dev links

2 participants