fix(desktop): 升级/重装刷新 ~/.freeos/portable - #89
Merged
Merged
Conversation
NSIS install/reinstall now stops a running FreeOS, writes a per-setup FREEOS_INSTALL_STAMP, and clears the extracted FREEOS_STAMP so the next launch re-unpacks packages and the embedded dashboard. Same-version rebuilds no longer keep a stale runtime just because portable already exists. Co-authored-by: XYAI Labs <haoboy8@gmail.com>
7 tasks
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.
Summary
Windows 桌面安装/覆盖安装/同版本重装不再因为
~/.freeos/portable已存在而跳过解压。下次启动会刷新packages/和内嵌 Dashboard,#88(local-session/ 无登录墙)及后续宿主修复不必再手工热补。用户数据(
octop.db、设置、对话)留在~/.freeos,产品路径不变:打开 → 可选模型(可跳过)→ 第一个智能体对话。未发布 GitHub Release,也未挂到 v0.0.4。
Why the #88 verification build still served the old UI
The host only re-extracted when
FREEOS_STAMPinside the bundled zip differed, or the semver was newer. Two other paths kept the old tree:shouldReplacePortablereturned false whilelaunchReadywas already true.FreeOS.exe; the finish-page launch handed off to the old instance, which never extracted.Result:
local_session.pystayed at 7227 bytes, Dashboard keptindex.DfMCjOvx.js,POST /api/auth/local-sessionstill 403, register/login still showed despite/?desktop=1.How upgrade refreshes portable now
$INSTDIR\FREEOS_INSTALL_STAMP(product version + tick count, unique per Setup run).%USERPROFILE%\.freeos\portable\FREEOS_STAMP(alsoFREEOS_HOME/OCTOP_HOME/ leftover~/.octop/portable). It does not deleteoctop.db.FREEOS_STAMPdiffers, the shell re-extracts the bundled zip into~/.freeos/portable, then copies the install stamp into that tree.{home}/updates/is applied even when the bundled stamp still matches.Test plan
cd desktop/src && go test -count=1 -timeout 180s .(PASS)python3 -m pytest --noconftest tests/unit/desktop/test_nsis_uninstall.py tests/unit/desktop/test_auth_brand_surfaces.py -q(20 passed)make all(full Python suite; this change is desktop host + NSIS source, no Python runtime)New coverage
FREEOS_STAMPmatchesFREEOS_STAMPforces same-version refresh (what Setup now does)Manual verify (Windows)
~/.freeos/portable/packages/octop/.../local_session.pyis the pre-fix(desktop): local-session 403 no longer forces register/login #88 size and Dashboard hashes look likeindex.DfMCjOvx.js.FREEOS_STAMPandFREEOS_INSTALL_STAMPexist under~/.freeos/portable,local_session.pyis the new size, Dashboard assets changed,POST /api/auth/local-sessionis not 403, UI goes optional model → first chat (no register/login).Target branch
main(hotfixfollow-up to fix(desktop): local-session 403 no longer forces register/login #88, already on main)