Commit Graph

12 Commits (b524b69fc8355e435025cbd218b283f4e6b0ff11)

Author SHA1 Message Date
mula.liu e6818e029e feat(ui): drop onto a button, and read the panels again
Three changes to the main window, requested together.

A file drop is now aimed. The three buttons are the only drop targets and the
button you release on is the action it runs; a release anywhere else on the
panel runs nothing and says so, instead of opening an action ring nobody asked
for. This replaces the old fallback in both delivery paths - the DOM handler and
the native webview drop - because two routes to the same gesture must not have
two different rules. dropFiles therefore takes a required action rather than an
optional one, and the actions ring is still reachable from the Shift-drag
gesture and from a file type with no convertible formats.

Recent rows can be dragged back onto those buttons. A row leaves Shift as a real
file drag, so one gesture can be reported twice, once by the DOM and once by the
native events, and which arrives first depends on the engine; recentDrag.landed
lets only the first through. The hint under the buttons names the affordance,
which is otherwise invisible, and all three buttons light up as candidates for as
long as any drag is in flight - a native one via dragging, an internal one via
rowDragging, since a row drag inside the webview does not raise native events.

Type sizes are on one ladder now (--text-3xs to --text-hero) instead of being
invented per rule, which is how the settings drawer drifted down to 7-8px. 92
declarations under 12px became one. The drawer is wider, its tabs are pills, and
the runtime, share, setup and radial surfaces moved onto the same scale.

The capture-behaviour setting is removed: the CaptureAfter enum, its field, its
command and its UI. A finished capture always shows the result card, falling back
to the editor when a card window cannot be created. Stored settings that still
carry captureAfter load unchanged, because the struct does not deny unknown
fields.

Also dropped 23 i18n keys no surface used, one dead re-export in history.ts, and
a stale .home-drop p rule that was outranking the new hint and sizing it as body
copy. tsconfig now turns on noUnusedLocals, noUnusedParameters and
noFallthroughCasesInSwitch, which is what keeps the dead imports from coming
back; the tree already passes all three.
2026-11-01 12:02:24 +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 22ff93a5fc fix(updates): make install and discard read as one decision
The row under a verified download took both controls from the Runtime tab, where
rows are dense: .runtime-install is 27px tall at 8.5px text and .settings-link is
a bare 8.5px text link with no box at all. In the Updates panel, whose own status
text, artifact chip and version pill are 12px, that produced an orange pill beside
floating text - the pair did not look like one choice, and the text link did not
read as a button you could press.

They get their own .update-action now, sized to the 12px scale the panel already
uses, and both take the same box so the eye groups them. The commit variant wears
the app's existing primary gradient, so the action that does something is the loud
one and Discard stays the quiet alternative.

"放弃" also stops competing at the moment it stops meaning anything: once the
handoff script is written the app is counting down to exit, so the row collapses
to the single control still in play. update_clear only resets the status, so this
is presentation, not a saved deletion.

updateInstalling was a whole sentence inside a fixed-height pill, which is what
made that button stretch unevenly against its neighbour. It is "正在安装…" now;
the panel's own closing paragraph already says Shift will restart and interrupt a
running conversion, so the button does not have to repeat it.
2026-10-26 16:22:34 +08:00
mula.liu c98d554a88 release: 0.1.3 — the Recent list survives an upgrade
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.
2026-10-26 04:02:31 +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 b96bb03bbd 修复bug 2026-10-25 18:23:08 +08:00
mula.liu c6eff4e131 修复bug 2026-10-25 12:24:05 +08:00
Shift 3227e7c2d9 hotkeys: duplicate copy stays alive and reports dead hotkeys; live state derives from instance ownership 2026-10-21 10:18:19 +08:00
Shift b47670f391 fix(editor,drag,hotkeys): unified editor header, drop-to-button routing, single-instance hotkey ownership 2026-10-21 10:07:16 +08:00
Shift 0eb75595c6 baseline: capture workspace state (bug fixes in progress) 2026-10-21 08:54:54 +08:00