feat(mac-client): Lisa.app native Mac client for the chat GUI - #26
Merged
Conversation
Sibling to LisaIsland.app (PR #24). Same WKWebView wrapper pattern but for the full chat experience rather than the passive pill. Differences from LisaIsland.app: - regular activation policy (Dock icon visible) - standard window chrome (titlebar, traffic lights, resizable, fullscreen) - loads localhost:5757/ instead of /island - frame autosave (remembers position + size across launches) - full Mac menu bar (App/File/Edit/View/Window) with standard ⌘N/W/R/F/Q - external links open in user's default browser (NSWorkspace.shared.open) - custom user agent "Lisa-MacClient/0.1" so the LISA server can log it What this PR delivers: - packaging/mac-client/Package.swift SwiftPM target, macOS 13+, executable. - packaging/mac-client/Sources/Lisa/ main.swift — NSApplication.regular activation policy AppDelegate.swift — window lifecycle + standard menu bar; closing window keeps app alive (standard Mac model), ⌘Q quits, Dock click reopens MainWindow.swift — NSWindow, 1200×800 default, 600×500 min, frame autosave under "ai.meetlisa.app.MainWindow" WebContent.swift — WKWebView + auto-retry on load failure + external links → NSWorkspace.shared.open - packaging/mac-client/Resources/Info.plist LSUIElement: false (dock icon visible), CFBundleIconFile: AppIcon, bundle ID ai.meetlisa.app, macOS 13 minimum, ATS local exception. - packaging/mac-client/build.sh Same swift-build + ad-hoc-sign pattern as island-mac, but ALSO generates Lisa.app/Contents/Resources/AppIcon.icns at build time from src/web/assets/lisa-mascot.png (the existing 1024×1024 mascot) via sips + iconutil. No binary blobs committed; icon stays in sync if the mascot changes. - packaging/mac-client/README.md Side-by-side comparison table with LisaIsland.app, build + install instructions, keyboard shortcut table. - packaging/mac-client/.gitignore Excludes .build/, Lisa.app/, Xcode artifacts. Verified locally: - Universal binary builds (`bash build.sh`) - App launches with mascot icon in Dock - Two ESTABLISHED connections to localhost:5757 (page + /events SSE) - Window frame autosave works across relaunches - ⌘W closes window, app stays in Dock - Dock click reopens window - ⌘R reloads chat - Runs simultaneously alongside LisaIsland.app — both apps reach LISA independently, neither knows about the other Closes #25 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
oratis
added a commit
that referenced
this pull request
Aug 4, 2026
L7 中间层在强制设置下**真的绑定到词了**,而且比 post-norm 干净得多:
臂 训练acc F1 F2 F3
base — 0.585 0.540 0.525
L1 定义进上下文 — 0.855 0.905 0.995
post-norm 本词 0.974 0.770 0.535 0.595
post-norm 换相反词 0.350 0.515 0.450
★ L7 本词 1.000 0.925 0.545 0.670
★ L7 换相反词 0.070 0.410 0.290
换词落差:L7 −0.855(0.925→0.070,不是失效,是答案跟着词整个翻过去)
post-norm −0.420 · P9b 未强制时仅 −0.018
🔴🔴 但跨读出方向随之消失:L7 的 F2 0.545 / F3 0.670,base 是 0.540 / 0.525;
而 P9 **未绑定**时是 0.935 / 0.945。
⟹ **P9 那个漂亮的跨格式迁移,正是"没绑定到词"换来的**——
未绑定时记忆给**物体表征**打了个与词无关的标,任何读出格式都能读到。
★ 四格全测下来,从来没有一格同时拿到两者:
绑定到词 跨读出方向
post-norm + 欠定(P5–P8) ❌ 0.017 ❌
L7 + 欠定(P9) ❌ 0.018 ✅ 0.940
post-norm + 强制(P10) ◐ −0.420 ❌ 0.565
L7 + 强制(P10) ✅ −0.855 ❌ 0.608
L1 上下文注入 ✅ 构造上必然 ✅ 0.905/0.995
⟹ 参数化路线最多只拿到其一;上下文注入两者都有。**该路线目前最强的负面证据。**
补的两处方法学漏洞:
· base/L1 参照臂(主脚本初版漏了)——逐用户 base 的 F1 从 0.240 到 0.880 都有,
个别用户像"F3=0.080"这种极端值大半来自基座,不可单独解读。新增 p10_ref_arms.py。
· 两臂优化量不对等:900 步是为 post-norm 定的(它 ep900 才收敛),
而 L7 在 ep150 就 loss 0.000 ⟹ 过训 6 倍,逐用户 held-out F1 方差极大(含一个 0.48)。
早停版未测,已写进限制。
同步:REPORT 顶部警告 + §3.13 + 自我推翻 #26 + §0.4 两条新的"差点犯的错";
Method 草稿 SCOPE 补充 + §6(0-b) + 禁令 18/19。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Closes #25. Sibling to LisaIsland.app — same WKWebView wrapper pattern, but for the full chat GUI rather than the always-on-top pill.
Why a separate app
Install one, both, or neither. Both just hit `localhost:5757`; neither knows about the other.
What's in this PR
`packaging/mac-client/` — a SwiftPM target that produces `Lisa.app`:
```
Sources/Lisa/
├── main.swift 19 LOC NSApplication boot (.regular policy)
├── AppDelegate.swift 175 LOC window lifecycle + standard menu bar
├── MainWindow.swift 55 LOC NSWindow + frame autosave
└── WebContent.swift 94 LOC WKWebView + auto-retry + external links