fix(dashboard): local import misses Devin-desktop logins — add Devin flavor + lift 128KB value cap - #264
Open
Rostopher wants to merge 1 commit into
Open
Conversation
…flavor + lift 128KB value cap - src/dashboard/local-windsurf.js: add 'Devin' to the state.vscdb scan flavors (rebranded desktop app keeps its data dir at %APPDATA%\Devin, so fresh installs were never discovered); raise MAX_STATE_VALUE_BYTES 128KB -> 512KB — live windsurfAuthStatus payloads measure ~160KB (apiKey plus base64 userStatus / allowedCommandModelConfigs protos) and over-cap rows were silently skipped, so the import reported 0 accounts even when the DB was found - test/local-windsurf-import.test.js: assert the Devin flavor is present in the candidate paths
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.
改了什么 / What changed
「登录取号」页的从本地 Windsurf 导入在只有新 Devin 桌面端(Windsurf 改名后的安装)的机器上找不到任何账号。
GET /accounts/import-local只扫描Windsurf/Windsurf - Next/Windsurf-Next/Windsurf Insiders四个数据目录,且单条 state 记录上限 128KB。改名后的 Devin 桌面端把数据放在%APPDATA%\Devin(macOS~/Library/Application Support/Devin),扫描全部not_found;即使手动把目录加进清单,活的windsurfAuthStatus实测约 160KB(apiKey + base64 的 userStatus / allowedCommandModelConfigs proto),超过 128KB 上限被静默跳过,导入仍报 0 个账号。Devinflavor(置于首位,旧 Windsurf flavor 保留给老安装);MAX_STATE_VALUE_BYTES128KB → 512KB 并在注释里写明原因。为什么 / Why
在一台只装了 Devin 桌面端(无 Devin CLI、无老 Windsurf 目录)的 Windows 机器上实测:导入面板显示四个
state.vscdb — not_found+config.json — not_found+credentials.toml — not_found。逐项排查:C:\Users\<u>\AppData\Roaming\Devin\User\globalStorage\state.vscdb,windsurfAuthStatuskey 存在且含可用的devin-session-token$...—— 只是目录名不在 flavors 清单里。MAX_STATE_VALUE_BYTES(128KB) 静默丢弃(extractFromStateDb的value.length > MAX_STATE_VALUE_BYTES分支无日志)。两处都是保守上限/清单滞后于上游改名,不涉及协议改动。
测试 / Testing
改动后在同一台机器上实测
discoverWindsurfCredentials():找到 1 个账号(sourcestate.vscdb:windsurfAuthStatus,apiKey masked 正确),sources 报告ok: true。(本地为 Node 22,npm run test:release的权威门禁由 CI 复跑。)Checklist
test/default-on-switch-registry.test.js台账(未新增开关)App.confirm/App.prompt(无 UI 改动)Co-Authored-By、Generated with等)