Reported: the 0.1.13 Windows build fails after download and restart. Two
independent defects sat on that path:
- The helper was launched as `cmd.exe /D /C "<path with spaces>" ...`.
cmd strips the first and last quote when the command has more than one
quoted token, so the script under `%TEMP%\Shift Updates` was never
recognized. Shift quit and nothing installed. The script path now arrives
in an environment variable, with the extra outer quote layer cmd needs.
- A silent install could still open the WebView2 warning. Nobody is present
to dismiss it during an in-app update, so the installer waited forever.
The manual warning stays; silent installs skip it.
The installer also waits briefly after taskkill before overwriting the EXE,
and the handoff logs its start and a missing target so a future failure is
visible in `%TEMP%\Shift Updates\handoff.log`.
Verified with Wine: the old command reproduces the quote-stripping failure,
the new one runs; the rebuilt installer completes silently without WebView2
and the full wait-install-relaunch handoff replaces the executable.
Two ledger sections, the README paragraphs for the banner, and the 0.1.13
version row.
「升级提示跨启动存活」records the constraint that is invisible in the code:
the probe is throttled to one a day, so a notice held only in memory is
visible on the morning a release is found and invisible on every launch
after — including the launch right after an update installs. It also
records why a restored notice is re-judged rather than trusted, since
remembering a claim is how you end up advertising the version the user is
already running.
「所有图标共用一份几何」records that the consistency the request asked for is
geometric, not chromatic: the tray mark must be flat and alpha-only
because the shell tints it, and the app mark must be coloured because
nothing tints a dock tile. What made the old icon read as another product
was the gradient, the shine, the shadow and six pastel wedge tints — not
the presence of colour.
Co-Authored-By: Codex <noreply@openai.com>
Versions, release docs and the ledger's version row for the two installers.
Both artifacts were built from this tree with the release key baked in, so
either one can verify the signed channel: `Shift-0.1.12-macOS-universal.dmg`
(universal, `Signature=adhoc`, `codesign --verify --deep --strict` and
`hdiutil verify` both clean, no notarization) and
`Shift-Setup-0.1.12-win-x64.exe` (cross-compiled, PE machine `0x8664`
checked, the platform's own frontend confirmed embedded).
Four reported issues, and the fifth request:
- 系统小图标改为黑白单色模板图,由 `scripts/build-tray-icon.py` 重绘。
- Windows 一键安装组件:winget 的良性退出码、未钉源导致的挂死、缺失的提权
路径,以及装完后进程内 PATH 仍是旧值,四个原因都在同一处。
- 钉在屏幕上的图片新增可用的放大/还原按钮。
- 「最近使用」的收藏行带上常驻指示器。
- 参照 nex_squid 降低闲置开销:伴生进程、Windows 手势监视、发现线程与主窗口
时钟四处采样节奏,外加最近列表只解码视线内的缩略图。
The Windows install fix still wants a real Windows host: the exact prose a
dismissed UAC prompt prints, and whether each package accepts
`--scope user`, are both handled defensively rather than verified.
Co-Authored-By: Codex <noreply@openai.com>
Three ledger sections, the 0.1.12 version row, and the user-facing lines
they describe.
「Windows 一键安装运行组件」is the fullest of them: four independent defects
hid in ten lines, and each one reads as "安装失败" from the UI, so the
section records which signal decides the outcome (exit code first, prose
only to break a tie) and why the attempt ladder starts on the command line
0.1.11 already sent.
「钉图窗口的放大与还原」and 「闲置时的取样节奏」record constraints that are
invisible in the code and easy to simplify back into a bug: sizing off
`monitor.size()` instead of the work area, mixing logical and physical
pixels between `set_size` and `set_position`, making a silent Shift copy
deaf in order to save 0.03%, and restoring `default_window_icon()` on the
tray because the colour wheel looked friendlier in the source.
Co-Authored-By: Codex <noreply@openai.com>
A file from the file manager arrives through the native drag channel, where wry fixes the macOS drag operation to Copy, so the cursor could never carry the refusal. The answer now lives on the button: it is disabled for the length of the gesture, shows a prohibition sign over its own label, and takes no hover feedback. A Recent row also stops being reported as 'no files' by the native enter, which had lit all three buttons for a file two of them could not serve.
Versions, release docs and the ledger's version row for the two installers.
Both artifacts were built from this tree with the release key baked in, so
either one can verify the signed channel: `Shift-0.1.11-macOS-universal.dmg`
(ad-hoc signed, `hdiutil verify` valid, no notarization) and
`Shift-Setup-0.1.11-win-x64.exe` (cross-compiled, PE machine `0x8664` checked,
frontend confirmed embedded).
The Windows drop fix needs a real Windows host before it can be called done:
this forge has no second machine, and the two delivery paths that went silent
are exactly the ones only WebView2 exercises.
A row dragged from Recent onto any of the three buttons did nothing on
Windows, and reported itself as a refusal. Both delivery paths can stay
silent on that platform, so the gesture now ends in `dragEnd`, which always
arrives and carries a point to hit-test.
The two paths are silent for two separate reasons. A Recent row is a real
file drag, and WebView2 registers its own OLE drop target on the window, so
the DOM drop never reaches the page; that target then reads only `CF_HDROP`,
which an in-page drag does not carry, so `enter_is_valid` stays false and the
native `over`/`drop`/`leave` are withheld too. `landed` keeps the fallback an
execution rather than a second one, and a release outside the window runs
nothing, because the hit-test has slack around every button and the row was
meant for Explorer.
An idle ring also stops getting in the way. It is borderless and always on
top, so one left open from a previous drop sits over the buttons; macOS
passes mouse events through its transparent pixels and Windows hands the
gesture to whichever HWND is under the pointer. Starting a row drag now puts
such a ring aside, while a ring owned by an in-flight Shift-drag gesture keeps
waiting for the release that decides its fate.
The availability rule stops being OCR's alone. `lib/dropCapabilities` answers
one question - can this button serve these files - and the button's spent
state, its candidacy while a drag is in flight, and the drop itself all ask
it, so Convert spends for a `.key` the way OCR spends for a PDF, on both
platforms, whichever drag source carried the file. Tools never spends: its
ring ends in Open, Reveal and Send. An unknown payload is not a refusal,
because spending on an empty path list would disable a gesture that works.
Two other reports this round were not about the drag at all:
- A file received over the LAN now reveals itself only when "show results in
Finder" is on, the way a finished conversion already behaves, and a batch
reveals once at its last file rather than once per file.
- Missing runtime components install as one request. Installs run one after
another because the package managers hold a single lock, and one package
answering two rows - Poppler for both PDF rows on Windows - is installed
once. The panel re-reads the machine afterwards either way, since a batch
that stopped at its first failure may have landed everything before it.
Two changes, one goal: the same gesture and the same news should look and read the
same way wherever they happen.
Dropping a file OCR cannot read used to be answered after the fact - the drop ran,
refused, and popped "文字识别仅支持图片格式". The user had to do the wrong thing
first and then be told. Now the decision happens when the drag starts: MainWindow
records the files in flight (`dragPaths`, from the native `enter` payload or from a
Recent row's `dragstart`) and marks the button spent for the whole gesture with
`is-drop-unavailable`, so the refusal is visible before the pointer is committed and
releasing on it is inert and silent. Both drag sources were verified in a production
build, including the reverse case: an image still lights the button and opens the
editor. `over` carries no paths and `dataTransfer` is unreadable during `dragover`,
so the paths have to be registered at the start - a later refactor that reads them
from the move event gets nothing.
The audit that followed found the same class of problem in the messaging, and worse:
the app said one thing three ways.
Prompts were the largest gap. A Rust-authored sentence reached the screen verbatim,
so a Chinese interface answered Convert with `Saved 1 file.`, and macOS's first-run
write-permission failure was one long English line. Rust now names the outcome or the
failure (`outcomeSaved`, `errCaptureBlocked`) and the interface words it; `translate`
still returns an unknown key unchanged, so genuine technical detail - `ffmpeg exited
with status 137` - is reported as it is rather than flattened into a generic line.
`feedback.test.ts` scans the Rust sources and fails on any code without wording in
both languages, and on any outcome the worder does not know; both directions were
checked by breaking them. It also asserts the two dictionaries list identical keys,
which was silently false before.
Durations were arbitrary: the identical share result showed for 2.6s in the ring and
3.6s in the main window, one file's `processing` message lived 12s in one branch and
120s in another, and generic errors used 2200/2400/3000/3200/3800. `FEEDBACK` is now
the only ladder, and `hold` is reserved for tasks that report progress and must not
expire mid-task.
Error text had three normalisation idioms, two inside the same file; `messageFrom()`
is the only one left. Share failures reported twice at once - a banner saying "could
not send" plus a toast naming a different reason - and now report once, in the panel,
with the real reason. The editor's failure notices wore a green check and lasted 1.4s;
a clipboard refusal was silent, and an OCR failure printed into the text box as though
it had been read from the image.
Disabled controls were dimmed at nine different opacities across the app, three
buttons were disabled in JS with no CSS at all, and several `:hover` rules answered a
disabled control. `--dimmed` plus `cursor: default` and `:not(:disabled)` hovers is now
the single treatment, and the OCR drop-target state joins it. Every transient message
is a live region, three unlabeled icon buttons are named, Escape closes the settings
sheet and the first-run panel, the main toast is raised above every sheet of its
window, and nine raw px font sizes went back onto the type ladder.
Out of scope, deliberately: the accent is still ~87 literals rather than one variable,
and the muted warm greys are still written many ways. Both need a visual pass, not a
search and replace.
Version and release docs for the two installers.
The ledger's drop-gesture section now says which release did what: 0.1.9 removed
the action-ring fallback and added the explaining toast, 0.1.10 removed the toast
and the panel's own drag animation. Both were written as one change until the
published 0.1.9 tree was checked, and it still had the toast and the is-dragging
rule.
Version, the release docs and the engineering ledger for the two installers.
The ledger gains a section on the Runtime components panel, because the bug it
records was invisible rather than broken: a dropped `return` made macOS answer
the document-PDF row with a Pandoc pipeline it never uses, so the panel reported
a missing component with no way to install it. The section states the invariant
that a row may not read as missing unless it also offers a way forward, which is
the part a future refactor is most likely to lose again.
README sections that described dropping files as "opens the action ring" now
describe the aimed rule, and the capture-behaviour option is gone from the
Settings tour.
An upgrade emptied the "Send to a device" list, with nothing in the UI to say why.
share.rs was not the cause: the last commit to touch it is b732b91, which only
recorded received files in the history library.
The cause is the macOS Local Network grant. Builds are ad-hoc signed, so every
rebuild is a new code identity, and the grant is keyed to that identity rather than
to the bundle id - 系统设置 now holds five Shift rows, one per build this machine has
run. The declared NSLocalNetworkUsageDescription was missing, so a new identity was
never asked and simply received no group traffic: beacons still went out, direct
unicast was still answered, only the list stayed empty.
That declaration is bc5d3b8. Both READMEs and the packaged macOS note now name the
permission and say what a denial looks like, because unlike Screen Recording it
produces no error - just an empty list. The Developer ID item in M5 records that
this has now actually cost a user a feature, not merely "may reset approvals".
Also ships the Updates panel button pair from 22ff93a, which was merged after 0.1.4
and never published.
Gates: cargo fmt --check clean, cargo test --lib 152 passed / 2 ignored, pnpm check
clean, pnpm test 38 passed. Channel verified by downloading both artifacts back
from the raw endpoint and re-hashing against the manifest, and by the ignored feed
test run with the release key. 55,504,368 B DMG and 24,521,557 B installer.
Two bugs, both visible in 平台技术方案(带图测试专用).docx: one figure, eleven
tables and 357 paragraphs, whose PDF came out as a text-only document.
First, AppKit's OOXML reader returns the text of a DOCX and silently drops every
inline drawing - an attributed string with zero attachments for a document with a
picture in it. That is not a rendering loss, it is a parse loss, so no margin,
print setting or layout change can recover the figure: by the time the page is
drawn, the picture is simply not in the attributed string. A DOCX whose body
contains an image is now converted by Pandoc into HTML with its media extracted
beside it, and the HTML - which Pandoc reads faithfully, headings, tables and
pictures - goes to the same printer. Image-only DOCX files keep the existing
page-scan path, which runs first, and a machine without Pandoc falls back to the
old text-only behaviour rather than failing.
Second, once pictures could arrive they printed as a cropped fragment of
themselves. The layout sizes an attachment from the density header inside the
file, assumes 72 dpi when there is none, and ignores both bounds and CSS width: a
1600 px screenshot at 96 dpi asks for 1200 points and lands on a 595 pt page.
Measured across PNG pHYs and JPEG JFIF, the placed width is exactly
pixels / dpi * 64. A plain NSTextAttachment does honour bounds, so the renderer
now replaces any oversized attachment with one that fits the text column; the
print operation scales it to the page with the text, landing at 499pt, which is
the printable width the body text already uses. Nothing is resampled, only the
size the layout asks for changes. This also fixes Markdown and HTML documents
with wide images, which had the same overflow.
Both halves are pinned by tests, and both fail against the previous build:
keeps_pictures_when_rendering_a_text_docx_to_pdf sees no image at all, and
fits_a_wide_picture_onto_the_page reports a picture placed 1066.77pt wide on a
595pt page. The second reads the Form XObject's /BBox, so it needs no content
stream decoded and no pixel compared.
The .pkg existed to hand a fresh machine a copy that was not quarantined, so it
opened with no prompt at all. The DMG has now been verified to work on a fresh
machine - drag to /Applications, one approval on first launch - which is the same
one approval the DMG has always needed. So the second container bought nothing
and is dropped: one artifact per platform is less to keep straight, and nothing in
the channel changes.
What the docs say instead of recommending the package: install the DMG, allow the
first launch once. In-app updates still never prompt, because Shift's own
downloader sets no quarantine flag. The macos manifest key stays a DMG for the
reason it always did - the in-app handoff mounts it with hdiutil.
scripts/macos-pkg.sh stays in the tree and RELEASE.md says plainly that it is no
longer part of a release, so the next reader does not wonder whether a publish is
missing it. The 0.1.3 branch still holds the retired package because removing it
means re-publishing; it has no manifest key, so nothing can be served it.
The packaged note is rewritten for the same reason: it told a reader to download a
file that will no longer be built, and its verification section checked the
package instead of the image.
The published DMG was refused on a fresh Mac as damaged/malware, with only
"Move to Trash" — no 仍要打开, no pane entry to approve. That is not the
"unidentified developer" box, and it is worse than shipping unsigned.
Cause: `signingIdentity: "Shift Local Signing"`, a locally created self-signed
certificate. On the build host it looks healthy — `codesign` reports valid on disk
and satisfies its Designated Requirement, `spctl` even accepts it — but the
certificate lives only in this keychain, is self-issued and CA:FALSE, so it cannot
chain to a trusted root on any other machine. Sequoia turns an unchainable
signature on a quarantined download into a hard refusal.
Releases that opened fine predates that config entry and were ad-hoc signed, which
gets the softer prompt the user can clear (right-click → 打开, or 允许 in 隐私与安全性).
Set signingIdentity to "-" explicitly so this cannot drift back, and rebuild all
three macOS/Windows artifacts from it: app is `Signature=adhoc`, the DMG carries no
signature of its own, and the pkg payload is ad-hoc too.
Docs corrected: the earlier explanation in "macOS packaging" blamed the DMG
container, which was wrong — the container still matters for first install (an
installed app is not left quarantined, so a .pkg opens with no prompt), but the
malware verdict came from the certificate.
Builds are signed with the self-signed "Shift Local Signing" identity and are not
notarized, so Gatekeeper calls Shift an unidentified developer. Dragging the app out
of the DMG hands that verdict to the app: a fresh machine refuses the first launch
until the user approves it in 系统设置 → 隐私与安全性.
`scripts/macos-pkg.sh` wraps the built bundle with pkgbuild and the channel now
publishes `Shift-macOS-universal.pkg` alongside the DMG. Verified rather than
assumed: installing a quarantined copy of the package leaves the installed app with
only `com.apple.provenance` — no `com.apple.quarantine` — and `codesign --verify
--deep --strict` still passes, because pkgbuild neither re-signs nor strips the
payload (CDHash identical across built bundle, DMG copy and pkg copy: 3b7fac6c…).
The package is unsigned because `productsign` needs an Installer Signing certificate
and this build has only a code-signing identity, so the approval does not vanish — it
moves to the download, once, before anything is installed. `installer -pkg … -target
/` needs no approval at all.
The `macos` manifest key stays a DMG on purpose: `update_install`'s handoff mounts the
image with hdiutil, so pointing the key at a .pkg would break in-app updates.
The Updates tab drops the "installs the ... artifact" chip, and the state label
now leads the status row instead of floating right, since the version it used to
sit beside moved into the header.
The file list no longer disappears on upgrade:
- The library already lived in the app data directory, outside the bundle, so an
in-app update or reinstall never touched `history.json`. What it never had was a
bridge from the store 0.1 used: that list lived in the webview's own storage,
which a reinstall does not survive, so the first launch of a newer build showed
an empty Recent list over files that were all still on disk.
- `history_import` merges those rows once, on the first launch after an upgrade.
An entry the library already lists keeps its own timestamp, the kind is
re-derived from the file rather than taken from the older store's guess, and the
legacy key is dropped only after the merge succeeds so a later upgrade cannot
resurrect rows the user has since removed.
- `HistoryEntry.kind`/`.at` gained serde defaults, so a row from the older store
degrades to a usable entry instead of failing the whole import.
Verified on this machine that the legacy `shift.recent` key is still present in the
installed app's webview store, so the import has rows to adopt.
Gates: cargo fmt --check clean, `cargo test --lib` 149 passed / 2 ignored,
`pnpm check` clean, `pnpm test` 38 passed, `pnpm build` ok.
Updates now finish without leaving the app. After the SHA256 gate, macOS replaces
its own `.app` from the downloaded disk image and Windows runs the same NSIS
installer with `/S`; both from a detached helper that waits for this process to
exit and then opens the new copy.
- `update.rs`: `bundle_path` (is this a bundled run?), `can_replace` (is the
enclosing folder writable — checked before quitting, not after), and the two
handoff scripts. Every macOS failure path still `open`s the bundle it had, so a
failed swap leaves Shift running rather than closed.
- `windows-installer.nsi`: `${Silent}` skips the "Shift is running, close it?"
box, which would otherwise abort an update nobody is there to answer.
- `useUpdate.ts`: a failed install reports its own error and keeps the verified
download, instead of downgrading a "ready" status to "error".
The Updates tab now leads with two lines above everything else: system,
architecture and running version, then the feed URL. The header no longer repeats
the version in the status row.
Verified end to end on macOS: a 0.1.1 bundle swapped by the published 0.1.2 image,
`codesign --verify --deep --strict` clean afterwards, image detached, and the
busy-image path shown to reopen the old copy.
Gates: cargo fmt --check clean, `cargo test --lib` 146 passed / 2 ignored,
`pnpm check` clean, `pnpm test` 34 passed, `pnpm build` ok.
Update path
- `src-tauri/src/update.rs`: manifest fetch, semver compare, optional ed25519
signature check against a key baked in at build time, then a size + SHA256
gate before an installer can run. `UpdateStatus` now reports the artifact key
it resolved so the UI can name what it will install.
- Settings → Updates panel shows the feed, the check/download state machine, and
the local OS, architecture and release artifact for this machine.
- `scripts/publish-release.sh` + `scripts/release-key.py` publish installers and a
signed `shift-update.json` onto an orphan `releases` branch.
Scope trims requested for this release
- Settings: the Radial rings tab is gone, so ring orders are read from
`settings.json` with no in-app editor for now.
- Main window: the update entry in the header bar is gone; updates live in
Settings → Updates only.
- Release targets are macOS universal and Windows x64. ARM64 and Linux stay
buildable and are no longer published; `docs/RELEASE.md` records the decision.
Gates: cargo fmt --check clean, `cargo test --lib` 142 passed / 2 ignored,
`pnpm check` clean, `pnpm test` 34 passed, `pnpm build` ok.