Commit Graph

13 Commits (706ff6fb264bd5f7e8663b76c827fae85f2a2ea9)

Author SHA1 Message Date
mula.liu 706ff6fb26 fix(icons): orange ground and white mark, as the product has always been
Reported: "你改的标注应用图标不对啊,我之前是橙底、白线的风格(参考 squid 的
图标)."

The previous commit inverted the figure/ground relationship. Chasing
consistency with the alpha-only tray mark, the app tile went to espresso
with a warm mark — technically consistent geometry, and it passed every
contrast check I ran, but those checks were pointed at the wrong axis.
Consistency has two of them here, geometry and light/dark, and the one a
returning user actually recognises is "orange tile".

Now the app icon is literally the tray mark with a colour turned on:
`#FF6B35` ground, which is the orange this project's own master already
carried, and `#FFF4EA` mark, the cream the app's panels are drawn on. The
plus stays a punched hole showing the ground rather than a third colour,
so both icons are one drawing on two different grounds. Two colours also
removes the failure mode the last version needed a rule to defend.

Tray PNG is byte-identical again; the .ico ladder (16/24/32/48/64/256) and
.icns entry set are unchanged, and every tracked PNG still matches its
committed dimensions.

Co-Authored-By: Codex <noreply@openai.com>
2026-11-19 21:49:05 +08:00
mula.liu 8a4c9d2b0d feat(icons): one mark, drawn twice — tinted for the shell, coloured for the dock
Reported: "应用的图标问题,要和当前的单色图标保持一致设计" — and clarified:
consistency of *design*, but colour in the panel and the system.

So consistency comes from geometry and filling rules, not from the palette.
`scripts/build-icons.py` now defines the ring once (OUTER/INNER/HUB/GAP/
PLUS_ARM/PLUS_BAR) and emits both marks from it: the tray keeps the alpha-only
flat form because the shell tints it, and the app icon keeps the same figure
in three flat colours drawn from the UI itself — `#FFB25C` wedges and the
`#f04f24` accent the app's own buttons use, on an espresso tile that is also
what shows through the plus punched out of the hub.

What the old icon actually got wrong was not that it was colourful. It was a
gradient tile with a radial shine, a drop shadow and six pastel wedge tints,
which is a different visual language from a crisp flat mark no matter what
hue it wears. Hence the rule: at most three flat colours, and no gradient,
gloss, shadow or per-wedge tint.

The menu-bar icon is byte-for-byte unchanged; the generator reproduces the
committed PNG exactly, so this commit alters only the coloured surfaces. The
hub-inside-a-lighter-ring orientation is deliberately not inverted, because
flipping which end of the mark is dark would read to existing users as a
different product rather than a redraw.

`tauri icon` regenerates the whole tracked set, and the .icns entry set and
.ico size ladder come out identical to the committed ones, so nothing in the
packaging contracts moves.

Co-Authored-By: Codex <noreply@openai.com>
2026-11-19 21:27:01 +08:00
mula.liu 287b3af09d fix(tray): let the system draw a black/white mark, not the colour wheel
Reported: "收到系统小图标时采用黑/白单色图标." The tray was handed
`app.default_window_icon()`, the 512 px gradient wheel, and `tray-icon`
scales whatever it is given to 18 pt: on the menu bar and in the Windows
notification area that is a blob, not a mark.

The new icon is drawn flat and alpha-only by `scripts/build-tray-icon.py`,
in the shape of the ring the app itself paints so the two read as one
product, and `icon_as_template` lets macOS tint it black or white per the
menu bar. Windows has no tinting to ask of, so it gets the same glyph at a
size it can actually render.

Co-Authored-By: Codex <noreply@openai.com>
2026-11-19 17:45:07 +08:00
mula.liu 935de413d8 docs: 收录 2026-11 全面评审的修复与约束
评审轮改动此前只在本地:更新链路的下载与校验收紧、分享接收的失败上报与
「完成后在访达中显示」、截图/录屏/文件读取的边界处理,以及新增的
ARCHITECTURE / SPECIFICATION / SECURITY / CONTRIBUTING 四份文档和
publish-release、CI 的调整。 ENGINEERING-NOTES 补上「更新、分享与读取边界」
一节,把这些不应被简化掉的约束写进台账。

这些改动已随 0.1.11 构建物发布,此提交只是让源码与产物在服务器上保持一致。
2026-11-07 12:42:35 +08:00
mula.liu 0aa929b2f5 build: bake release key into macOS packages 2026-10-27 18:49:21 +08:00
mula.liu df35111326 release: prepare Shift 0.1.8 2026-10-27 18:45:32 +08:00
mula.liu 708bb5b0b1 v 0.1.7 2026-10-26 20:11:20 +08:00
mula.liu 48b24acc2f fix(release): derive the public key from either key file
A raw ed25519 private key is 32 bytes and so is its public half, so
'pubkey KEY_FILE' could not tell them apart and printed the private bytes as a
public key. Baking those into a build produces a key no signature can verify
against, and build.rs accepts any 64 hex characters, so the mistake is silent at
build time and shows up on a user's machine as an update check that cannot verify
the manifest.

Anything not named *.pub is now read as the private key it came from and expanded,
so both documented spellings of the command yield the same key.
2026-10-26 17:29:59 +08:00
mula.liu e9760b8514 release: publish a macOS .pkg so a fresh machine can open Shift
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.
2026-10-26 09:22:39 +08:00
mula.liu 15498482fa release: 0.1.2 — install the update in place, and lead the tab with the host
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.
2026-10-26 03:41:47 +08:00
mula.liu b732b91ea6 release: 0.1.1 — update channel, settings/UI trims, macOS + Windows x64 only
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.
2026-10-26 03:06:46 +08:00
mula.liu c6eff4e131 修复bug 2026-10-25 12:24:05 +08:00
Shift 0eb75595c6 baseline: capture workspace state (bug fixes in progress) 2026-10-21 08:54:54 +08:00