Skip to content

Update from task 22ee51f5-53cd-435c-ad09-bbfa26f7dbcd - #5

Merged
ciao22king merged 2 commits into
mainfrom
code-refactoring-and-optimization-7dbcd
Oct 11, 2026
Merged

ciao22king merged 2 commits into
mainfrom
code-refactoring-and-optimization-7dbcd

Conversation

@ciao22king

Copy link
Copy Markdown
Owner

This PR was created by qwen-chat coder for task 22ee51f5-53cd-435c-ad09-bbfa26f7dbcd.

- internal/app/app.go: Changed model receiver from value to pointer in Update, handleGlobalKey, applyClipboard, recordProgress, applyFetchResult, updateHistory, updateURL, updateBranch, updateDestination, startClone, and updateResult to ensure state mutations (like searchActive, history removal) persist across calls.
- internal/app/app.go: Refactored activateSearch method to centralize search field activation logic for both global shortcut and direct key press paths.
- internal/app/app.go: Updated Run function to pass a pointer to newModel to tea.NewProgram to align with the pointer-receiver Update method requirement.
- internal/fetch: Fixed URL parsing error on Windows by correctly handling file:// scheme paths with drive letters (e.g., C:\Users\...) which were previously interpreted as invalid ports.
- internal/app/app.go: Added lastKey field to model for better Enter key handling logic
- internal/app/app_test.go: Fixed impossible type assertion by updating apply helper to assert *model instead of model, matching the pointer receiver on Update method
- internal/core/repository.go: Added isWindowsAbsPath helper to correctly handle Windows drive letters (e.g., C:\) before url.Parse to avoid port parsing errors
@ciao22king
ciao22king merged commit 58c5723 into main Oct 11, 2026
3 of 4 checks passed
@ciao22king
ciao22king deleted the code-refactoring-and-optimization-7dbcd branch October 11, 2026 14:45
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.

2 participants