Skip to content

Fix URL autocomplete replacement#510

Merged
gschier merged 4 commits into
mainfrom
agent/fix-url-autocomplete-replacement
Jul 15, 2026
Merged

Fix URL autocomplete replacement#510
gschier merged 4 commits into
mainfrom
agent/fix-url-autocomplete-replacement

Conversation

@gschier

@gschier gschier commented Jul 15, 2026

Copy link
Copy Markdown
Member

Fixes URL autocomplete inserting a second protocol separator or appending a saved URL to the existing value.

  • Give URL completions option specific replacement behavior
  • Preserve the hostname when accepting http:// or https:// before an existing ://
  • Replace the complete value when accepting a saved URL
  • Share the behavior between HTTP and WebSocket request URL bars
  • Add focused regression coverage

https://yaak.app/feedback/posts/autocomplete-inserts-duplicate-protocol

@gschier
gschier marked this pull request as ready for review July 15, 2026 15:08
@greptile-apps

greptile-apps Bot commented Jul 15, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes URL autocomplete replacement in HTTP and WebSocket request bars. The main changes are:

  • Adds option-specific replacement behavior for URL completions.
  • Preserves the hostname when completing a protocol before ://.
  • Replaces the full input when selecting a saved URL.
  • Shares completion configuration between both request panes.
  • Adds focused tests for the updated behavior.

Confidence Score: 5/5

This looks safe to merge.

  • The latest changes apply the same replacement behavior to both URL bars.
  • The focused tests cover the reported duplicate-separator and appended-URL cases.
  • No blocking issues were found in the changed code.

Important Files Changed

Filename Overview
apps/yaak-client/components/core/Editor/url/completion.ts Adds shared URL options and custom replacement ranges for protocol and saved-URL completions.
apps/yaak-client/components/core/Editor/genericCompletion.ts Allows generic completion options to provide a CodeMirror apply handler.
apps/yaak-client/components/core/Editor/url/completion.test.ts Covers protocol suffix handling, protocol insertion, saved-URL replacement, and option composition.
apps/yaak-client/components/HttpRequestPane.tsx Uses the shared URL completion configuration for HTTP requests.
apps/yaak-client/components/WebsocketRequestPane.tsx Uses the shared URL completion configuration for WebSocket requests.

Reviews (4): Last reviewed commit: "Reapply "Always include URL protocols"" | Re-trigger Greptile

greptile-apps[bot]
greptile-apps Bot previously approved these changes Jul 15, 2026
@greptile-apps
greptile-apps Bot dismissed their stale review July 15, 2026 15:13

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

greptile-apps[bot]
greptile-apps Bot previously approved these changes Jul 15, 2026
@greptile-apps
greptile-apps Bot dismissed their stale review July 15, 2026 15:19

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

greptile-apps[bot]
greptile-apps Bot previously approved these changes Jul 15, 2026
@greptile-apps
greptile-apps Bot dismissed their stale review July 15, 2026 15:28

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

@gschier
gschier merged commit d72b7d7 into main Jul 15, 2026
6 checks passed
@gschier
gschier deleted the agent/fix-url-autocomplete-replacement branch July 15, 2026 15:33
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.

1 participant