Repository navigation
Fix OAuth link overflow and copy retry / 修复授权链接溢出与复制重试 - #17
Merged
Merged
Conversation
This was referenced Sep 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
English · 简体中文
English
A clipboard failure should not leave the user with a clipped authorization URL or force a new login attempt just to copy it again.
Problem and reproduction
In Add Account, generate an OpenAI or Google authorization link while native clipboard copying is unavailable. The existing fallback puts the entire URL into a centered status message. A long URL can overflow the dialog, making the complete link difficult to select. Closing and reopening to retry starts another authorization attempt. The OpenAI fallback also puts the outgoing authorization URL into the field intended for the returning callback URL.
These are fallback-UI problems on any platform; they are separate from Windows failing to launch
pbcopy.What changes—and what does not
Production changes are confined to three frontend files: the account modal, its CSS, and a small
OAuthLinkcomponent. The other four files are an isolated browser regression fixture and its runner.No Rust code, clipboard backend, OAuth parameters, callback validation, token exchange, account schema, or unrelated screens are changed. This adds no package dependency and contains no Korean localization.
Verification
Local Windows validation at head
fb82d59passed:The browser test passed 8 isolated scenes, with assertions for both providers' copy failure/retry, exact URL preservation, no extra login call on re-copy, an empty callback input, three smaller viewport sizes, and close/reopen races. Native IPC and account data are mocked; outbound service requests are blocked. This verifies UI behavior, not real OAuth login or native clipboard availability.
Independent review: one commit directly on upstream
main(f64a44a). #16 fixes the Windows clipboard backend; this PR makes its failure path usable and does not require #16. Either can be merged on its own.简体中文
剪贴板复制失败后,用户仍应能取出完整的授权链接,而不必为了再复制一次就重新发起登录。
问题与复现方式
在“添加账号”中生成 OpenAI 或 Google 授权链接,并让系统剪贴板复制失败。现有兜底逻辑会把整条 URL 放进居中的状态提示中;链接较长时会撑出弹窗,难以完整选中。用户关闭后重开来重试,又会产生新的授权请求。此外,OpenAI 分支还会把“发起授权的 URL”写进本应用于粘贴“授权完成后回调 URL”的输入状态。
这是各平台都可能遇到的失败兜底问题,与 Windows 无法执行
pbcopy是两个独立问题。本次改什么、不改什么
实际界面修改只涉及 3 个前端文件:账号弹窗、对应 CSS、一个小型
OAuthLink组件。其余 4 个文件用于隔离的浏览器回归测试。不改 Rust 后端、剪贴板实现、OAuth 参数、回调校验、令牌交换、账号结构或其他页面;不新增依赖,也不包含韩语本地化。
验证依据
在 Windows 上针对当前提交
fb82d59完成本地验证:8 个隔离浏览器场景通过。断言覆盖 OpenAI/Google 两条路径的复制失败与重试、URL 原文保留、再次复制不增加登录调用、回调输入仍为空、3 种较小窗口尺寸,以及关闭后重开时的异步结果处理。测试使用模拟 IPC 和账号数据,并阻止外部服务请求;验证的是界面行为,不把它表述为真实 OAuth 登录或系统剪贴板测试。
**可独立审阅和合并:**仅一个提交,直接基于 upstream
main(f64a44a)。#16 解决 Windows 剪贴板后端问题,本 PR 解决复制失败后的界面可用性,两者互不依赖,可以分别接受。