Repository navigation
fix(desktop,make): size two soft-fill hints to their text; run make targets under sh - #1339
Merged
Merged
Conversation
The 'another device is in control' note was a plain block div, so its tint painted the whole text column and read as a banner rather than a label on the row. Same for the connect-failure note below it.
Same shape as the peer row's held note: a one-word label in a block div painted the whole nav column instead of reading as a chip.
`make install` reached install-skills and died: git submodule update --init skills /usr/bin/bash: -c: line 2: syntax error: unexpected end of file from `if' command on line 1 The Windows branch of install-skills was still cmd syntax (`@if not exist .. mkdir ..`, `for /d %%d`, `rmdir /s`, `xcopy`), and make hands every recipe to SHELL — sh.exe whenever Git for Windows is on PATH — so bash parsed `if not exist` as an unfinished `if`. b51c05d fixed the same defect in install-cli / install-desktop / install-desktop-headless and left this target behind, which made the failure land *after* the binaries were already installed: the documented full install stopped on its last step and reported an error. The Windows branch now does the copy through node, like copy_win_binaries and install-local already do: node is a build prerequisite, its argument quoting and path joins behave identically under cmd.exe and sh.exe, and it removes each bundle before copying so a stale file cannot survive a reinstall. The check mark is written as a JS escape (String.fromCharCode(0x2713)) so the command line stays ASCII whatever the shell or console code page. Scope is the Windows branch alone - the POSIX symlink branch and its orphan-link pruning are untouched, and the Windows side keeps its own semantics of real copies there is no link to dangle. Verified on Windows against a temporary USERPROFILE, never the live skills directory: make install-skills USERPROFILE=D:/tmp/skills-t1 (SHELL=sh.exe) submodule checked out, 17 bundles copied, exit 0 same target with SHELL=C:/Windows/system32/cmd.exe 17 bundles copied, exit 0 - the recipe is shell-agnostic as intended a file planted in a copied bundle is gone after the next run, and a directory of the user's own (my-own-skill) is left in place, which is the same "replace builtin names only" behaviour as the cmd recipe and the POSIX branch. The submodule was cloned from the local checkout (submodule.skills.url via GIT_CONFIG_* env override) so the test needed no network; the shared .git/config was not modified. The clone is in the task worktree only. Not touched: `clean`, `profile-*` and `desktop-sidecars` carry the same cmd syntax, but they are not install targets and were already out of scope when b51c05d converted the three install targets.
`make install-local` copied a `futureos` produced by a plain `cargo build --profile local`, which leaves Tauri on `cfg(dev)`: the window opens `build.devUrl` (http://127.0.0.1:5173) and, with no Vite server running, shows only ERR_CONNECTION_REFUSED. The local targets had deliberately skipped the frontend build, so nothing embedded one either — an installed binary that could not open a window on its own. The Desktop is now built with a `custom-protocol` feature on `futureos` (forwarding `tauri/custom-protocol`), the same switch `tauri build` sets for shipped binaries, and `build-desktop-local`/`build-local` run `npm run build` first so `desktop/dist` exists and is current. `stabilize-dist-mtimes` keeps an unchanged bundle's timestamps, so cargo still skips the Desktop crate when only Rust changed. Verified: `cargo build --profile local -p futureos --features custom-protocol` emits no `rustc-cfg=dev`, and the resulting binary carries the same 313 embedded asset keys as the release build.
`make install` was fixed for sh.exe in b51c05d/e26f3283, but four targets kept writing their Windows branch in cmd syntax and are just as broken on a Windows checkout with Git for Windows on PATH, because make hands every recipe to SHELL and SHELL is sh.exe there: make clean @if exist target rmdir /s /q target -> /usr/bin/bash: syntax error: unexpected end of file from `if' command, exit 2, nothing deleted make uninstall cmd /c del /q "..\future.exe" .. -> exit 0 and "Removed installed binaries" printed, but nothing removed: bash passes the paths to cmd.exe as separate argv entries, cmd drops to its prompt for the rest of the recipe's stdin, and make sees success make desktop-sidecars @if not exist .. mkdir .. + copy /y target\release\.. -> cmd builtins and backslash paths bash rejects or silently strips make profile-* set "RUSTFLAGS=.." && cargo build -> cmd syntax under sh, POSIX `VAR=1 cmd` prefix under cmd; plus `where blondie >NUL || (.. & exit /b 1)` and an unquoted `echo Starting profile run (..)` that bash reads the parenthesis of as a syntax error All of them now do the same thing the install targets do - node for the file work, since it is already a build prerequisite (`TARGET` is probed with it) and its quoting and path joins behave identically under cmd.exe and sh.exe: - clean: `fs.rmSync(dir, {recursive:true, force:true})` per directory, the same result as `rmdir /s /q` (missing paths skipped, contents go with the directory, a locked file fails loudly). It removes a directory junction rather than what it points at, so a worktree that linked the main checkout's node_modules does not empty the main one. - uninstall: `fs.rmSync(file)` per binary, ENOENT skipped, a held-open binary reported instead of failing the target - the old `-` prefix's intent. - desktop-sidecars: mkdir + copy through node, staging the same future-<target>.exe name. `COPY_CMD` existed only for this line and is gone. - profile-agent-build / profile-heap: the overrides became target-specific *exported* make variables (`RUSTFLAGS`, `CARGO_PROFILE_RELEASE_DEBUG`, `CARGO_PROFILE_RELEASE_STRIP`) instead of shell prefixes, which also removes the `--config` arguments whose quoting had to differ per shell. `release` keeps line-tables-only for the profiler build and the full `debug=2` on Windows for the dhat heap build, `strip=none` both, exactly as before. - profile-agent: `PROFILE_DURATION` is exported the same way (90s, unchanged on both platforms), profile-results/ and the progress line go through node, and the blondie check is a node spawn that prints the same three lines and exits 1 when it is missing. Scope is the Windows branches; the POSIX branches are byte-identical apart from the two removed `VAR=value cmd` prefixes, whose meaning an exported make variable carries identically. Verified on Windows, both shells (SHELL=sh.exe, SHELL=cmd.exe) and with `make OS=linux` for the POSIX branches, in a throwaway copy of the Makefile with stand-in cargo/python executables, so no real build ran: clean exit 0 both shells, all five trees gone; over a junctioned desktop/node_modules the link goes and its target stays uninstall all installed exes gone, exit 0; a second run with nothing installed still exits 0 and prints the line desktop-sidecars staged desktop/src-tauri/binaries/future-<host>.exe, exit 0 profile-agent-build cargo sees RUSTFLAGS=-C force-frame-pointers=yes, DEBUG=line-tables-only, STRIP=none, argv intact profile-heap cargo sees DEBUG=2, STRIP=none, --features dhat-heap profile-agent cargo sees the build overrides + PROFILE_DURATION=90, profile-results/ created, bench argv intact; without blondie on PATH it prints the install hint and exits 1 profile-quick unchanged Windows branch, runs under both shells The `CARGO_PROFILE_RELEASE_<key>` mapping itself was checked against real cargo 1.97.1 on a throwaway crate: with the variables set it reports `release` profile [optimized + debuginfo] and writes a 1.2 MB .pdb, without them [optimized] only, and `CARGO_PROFILE_RELEASE_DEBUG=bogus` is rejected with "error in environment variable `CARGO_PROFILE_RELEASE`" - so the recipes' exported values do reach the profile, they are not silently ignored. `make -n` still parses every affected target (clean, uninstall, desktop-sidecars, profile-agent-build, profile-agent, profile-quick, profile-heap) with no shell or make error, and `make clean` / `make uninstall` were run for real in the task worktree and a temporary PREFIX.
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.
四件小修,都是「用错了尺寸或 shell 语法」这一类,没有功能新增。
1. 设备接管提示的底色铺满整列
desktop/src/features/remote-peer/RemotePeersView.tsxpeer-held(「另一台设备正在接管」)是块级div,底色从侧栏一直铺到按钮前面,看起来像横幅而不是贴在设备名下的标签。改成w-fit max-w-full:按文字宽度收缩,长文案仍在列内换行。紧邻的错误行peer.error一并改成同样形状,免得两条提示不一致。2. 设置对话框左侧导航的「测试版」提示
desktop/src/features/settings/SettingsDialog.tsx同一套写法(块级
div+ 软底色)在导航栏里只写着三个字,却把 184px 宽的整栏铺满。加w-fit,与「关于」页用的Badge小胶囊一致。同类排查结果:其余
bg-warning-soft/bg-danger-soft用法都是整行/整块横幅(p-2、px-3 py-2带边框),本就该拉满;真正的小胶囊(DeviceSelector接管角标、Badge、MissingReference、VibeStage)都已用inline-flex或shrink-0约束住;移动端没有小标签被拉满的情况。3.
make install-skills在 cmd.exe 下报错MakefileWindows 上
make默认走cmd.exe,而目标里用的是 POSIX 语法。改为sh.exe执行,并把CARGO_PROFILE_RELEASE_DEBUG/CARGO_PROFILE_RELEASE_STRIP/PROFILE_DURATION改成 target 级 export 变量(与仓库里PYTHONDONTWRITEBYTECODE、REGENERATE_PROTO同模式),顺带消掉了需要按 shell 分别加引号的--config。平台差异(Windows 堆剖析debug=2、其余line-tables-only、strip=none、90 秒)全部原样保留。4.
clean/uninstall/ profile 目标同样只能在 sh 下跑Makefile与第 3 条同因。POSIX 分支除删掉两个
VAR=value cmd前缀(export 变量语义相同)外逐字节未变。Makefile 改动的验证方式(CI 不覆盖这些目标)
在临时目录用 Makefile 副本 + 假
cargo/python跑,未触发真实构建;每个目标都用SHELL=sh.exe与SHELL=cmd.exe各跑一遍:clean:两种 shell 都退出 0,五个目录全没;desktop/node_modules是 junction,链接消失、目标内容完好uninstall:exe 全删、退出 0;重复跑仍退出 0desktop-sidecars:future-x86_64-pc-windows-msvc.exe正确落位profile-agent-build/profile-heap:cargo 收到预期的RUSTFLAGS/DEBUG/STRIP,argv 完整profile-agent:PROFILE_DURATION=90、profile-results/创建、把 blondie 从 PATH 拿掉后打印提示并退出 1CARGO_PROFILE_RELEASE_*确实生效(带变量时产物是[optimized + debuginfo]并生成.pdb;DEBUG=bogus会被 cargo 拒绝,说明不是被静默忽略)make -n对 7 个受影响目标无解析错误5. 本地安装的 Desktop 内嵌前端
Makefile+desktop/src-tauri/Cargo.tomlmake install-local装出来的futureos内嵌前端资源,不再打开就显示ERR_CONNECTION_REFUSED。新增custom-protocolfeature 与desktop-frontend/build-desktop-local/build-local目标。说明
本分支还夹带了一个非本 PR 主题的提交:
fix(agent)两单(#1333、#1337)走的是独立 PR,勿与这批混淆。#1337仍是独立 PR。