mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-11 02:12:00 +03:00
document search, always-on-top, auto-update, arm64 build
This commit is contained in:
parent
d168bf9af9
commit
055c0b6144
4 changed files with 57 additions and 7 deletions
|
|
@ -26,10 +26,13 @@ src/
|
|||
storage.ts Tauri commands / localStorage fallback
|
||||
extensions.ts runs user .js files against the engine
|
||||
i18n.ts interface strings (en/ru)
|
||||
updater.ts checks tauri-plugin-updater, installs + relaunches
|
||||
src-tauri/
|
||||
src/main.rs tray, hide-to-tray, storage commands, rates fetching
|
||||
(open.er-api.com + CoinGecko) with cache, backups,
|
||||
data-folder migration, file drops
|
||||
data-folder migration, file drops, plugin registration
|
||||
(autostart, global-shortcut, single-instance, opener,
|
||||
dialog, updater, process)
|
||||
```
|
||||
|
||||
## How a line becomes a result
|
||||
|
|
@ -102,6 +105,10 @@ snapshot price) plus the mirror list in `src-tauri/src/main.rs`.
|
|||
scroll/geometry changes. Click-to-copy reads `data-value`.
|
||||
- Engine evaluation is synchronous on every keystroke — a full sheet parse
|
||||
is well under a millisecond, so there's no debounce or worker.
|
||||
- Search-all-sheets (`Ctrl+F`) is a plain line scan over `data.contents` in
|
||||
`main.ts`, not a CodeMirror search extension — it has to cross documents,
|
||||
so it never touches the active editor until a result is clicked
|
||||
(`editor.goToLine`).
|
||||
|
||||
## Storage
|
||||
|
||||
|
|
@ -112,9 +119,21 @@ snapshot price) plus the mirror list in `src-tauri/src/main.rs`.
|
|||
deleted sheets become `.numi` files under `backups/deleted/` and are pruned
|
||||
by age. Saving is debounced at 400 ms.
|
||||
|
||||
## Auto-update
|
||||
|
||||
- `updater.ts` calls `tauri-plugin-updater`'s `check()` on boot; if a signed
|
||||
update is available the user is prompted, then `downloadAndInstall()` +
|
||||
`tauri-plugin-process`'s `relaunch()`.
|
||||
- The update endpoint is `latest.json` published alongside each GitHub
|
||||
Release. `release.yml` signs both architectures with a minisign keypair:
|
||||
the public half is embedded in `tauri.conf.json`; the private half + its
|
||||
password live only as `TAURI_SIGNING_PRIVATE_KEY(_PASSWORD)` repo secrets
|
||||
(write-only — there is no durable copy in the repo). Losing that key means
|
||||
already-installed copies can never trust a future signed release again.
|
||||
|
||||
## Tests
|
||||
|
||||
`npm test` runs ~94 vitest cases over the engine (`src/engine/*.test.ts`):
|
||||
`npm test` runs ~96 vitest cases over the engine (`src/engine/*.test.ts`):
|
||||
every expression class, both languages, deterministic injected rates,
|
||||
plus a regression suite covering all known-fixed bugs.
|
||||
UI is exercised manually; the engine is where the complexity lives.
|
||||
|
|
|
|||
|
|
@ -27,10 +27,13 @@ src/
|
|||
storage.ts команды Tauri / запасной вариант на localStorage
|
||||
extensions.ts запускает пользовательские .js-файлы через движок
|
||||
i18n.ts строки интерфейса (en/ru)
|
||||
updater.ts проверка tauri-plugin-updater, установка + перезапуск
|
||||
src-tauri/
|
||||
src/main.rs трей, скрытие в трей, команды хранилища, загрузка курсов
|
||||
(open.er-api.com + CoinGecko) с кэшем, резервные копии,
|
||||
миграция папки данных, открытие файлов
|
||||
миграция папки данных, открытие файлов, регистрация
|
||||
плагинов (autostart, global-shortcut, single-instance,
|
||||
opener, dialog, updater, process)
|
||||
```
|
||||
|
||||
## Как строка превращается в результат
|
||||
|
|
@ -102,6 +105,10 @@ src-tauri/
|
|||
прокрутке/изменении геометрии. Клик для копирования читает `data-value`.
|
||||
- Оценка движка синхронная на каждое нажатие клавиши — полный разбор листа
|
||||
занимает менее миллисекунды, поэтому нет дебаунса и воркеров.
|
||||
- Поиск по всем листам (`Ctrl+F`) — простое построчное сканирование
|
||||
`data.contents` в `main.ts`, а не расширение поиска CodeMirror — ему нужно
|
||||
пересекать документы, поэтому он не трогает активный редактор, пока не
|
||||
кликнут результат (`editor.goToLine`).
|
||||
|
||||
## Хранилище
|
||||
|
||||
|
|
@ -112,9 +119,22 @@ src-tauri/
|
|||
удалённые листы становятся `.numi`-файлами в `backups/deleted/` и удаляются по возрасту.
|
||||
Сохранение откладывается на 400 мс.
|
||||
|
||||
## Автообновление
|
||||
|
||||
- `updater.ts` вызывает `check()` из `tauri-plugin-updater` при запуске; если
|
||||
подписанное обновление доступно, пользователю предлагают установить, затем
|
||||
`downloadAndInstall()` + `relaunch()` из `tauri-plugin-process`.
|
||||
- Эндпоинт обновлений — `latest.json`, публикуемый вместе с каждым GitHub
|
||||
Release. `release.yml` подписывает обе архитектуры парой ключей minisign:
|
||||
публичная половина зашита в `tauri.conf.json`; приватная половина + пароль
|
||||
живут только как секреты репозитория `TAURI_SIGNING_PRIVATE_KEY(_PASSWORD)`
|
||||
(write-only — в репозитории нет постоянной копии). Потеря этого ключа
|
||||
означает, что уже установленные копии никогда больше не смогут доверять
|
||||
будущему подписанному релизу.
|
||||
|
||||
## Тесты
|
||||
|
||||
`npm test` запускает ~94 vitest-кейса по движку (`src/engine/*.test.ts`):
|
||||
`npm test` запускает ~96 vitest-кейсов по движку (`src/engine/*.test.ts`):
|
||||
все классы выражений, оба языка, детерминированные инжектированные курсы,
|
||||
плюс набор регрессий по всем известным исправленным багам.
|
||||
UI проверяется вручную; движок — там где живёт вся сложность.
|
||||
|
|
|
|||
10
README.md
10
README.md
|
|
@ -25,8 +25,9 @@ Works in **English and Russian** at the same time: `5 метров в см`, `20
|
|||
|
||||
## Install
|
||||
|
||||
Grab the latest `Summarum_*_x64-setup.exe` from [Releases](../../releases),
|
||||
run it, done. The whole app is about 2 MB.
|
||||
Grab the latest `Summarum_*_x64-setup.exe` (or `arm64-setup.exe` on Windows
|
||||
on ARM) from [Releases](../../releases), run it, done. The whole app is
|
||||
about 2 MB. It checks for updates on its own after that.
|
||||
|
||||
Requirements:
|
||||
|
||||
|
|
@ -74,6 +75,8 @@ the sheet total; select a few lines to see just their sum.
|
|||
|
||||
- **Ctrl+Alt+N** (configurable — the settings field records keys you press)
|
||||
shows/hides the window from anywhere. Closing hides to tray.
|
||||
- **Ctrl+F** (or the 🔍 button) searches every sheet at once, not just the
|
||||
one you're in — click a hit to jump straight to that line.
|
||||
- **Click a result** to copy it. Copying a line copies it *with* the answer
|
||||
(`rent * 3 = $1,500`). **Ctrl+Shift+C** copies the whole sheet with answers.
|
||||
- **Drag the divider** to resize the results column.
|
||||
|
|
@ -84,6 +87,9 @@ the sheet total; select a few lines to see just their sum.
|
|||
dragging the file back in. Settings → Backups opens the folder.
|
||||
- **Data folder is configurable** — point it at OneDrive/Dropbox and your
|
||||
sheets follow you between machines.
|
||||
- **Always on top** (Settings) pins the window above everything else.
|
||||
- The app checks for updates on launch and offers to install them — no
|
||||
manual download-and-reinstall.
|
||||
- Light/dark theme, en/ru interface, configurable precision and separators.
|
||||
|
||||
## Extensions
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ $2000 в рублях → 144,060 ₽
|
|||
|
||||
## Установка
|
||||
|
||||
Скачай последний `Summarum_*_x64-setup.exe` из [Releases](../../releases), запусти — готово. Весь установщик около 2 МБ.
|
||||
Скачай последний `Summarum_*_x64-setup.exe` (или `arm64-setup.exe` для Windows on ARM) из [Releases](../../releases), запусти — готово. Весь установщик около 2 МБ. Дальше обновления проверяются сами.
|
||||
|
||||
Требования:
|
||||
|
||||
|
|
@ -71,6 +71,8 @@ $2000 в рублях → 144,060 ₽
|
|||
|
||||
- **Ctrl+Alt+N** (настраивается — поле в настройках записывает нажатые клавиши)
|
||||
показывает/скрывает окно из любого места. Закрытие прячет в трей.
|
||||
- **Ctrl+F** (или кнопка 🔍) ищет сразу по всем листам, а не только по текущему —
|
||||
клик по результату переносит прямо на нужную строку.
|
||||
- **Клик по результату** копирует его. Копирование строки копирует её *вместе с ответом*
|
||||
(`аренда * 3 = $1,500`). **Ctrl+Shift+C** копирует весь лист с ответами.
|
||||
- **Потяни разделитель** чтобы изменить ширину колонки результатов.
|
||||
|
|
@ -80,6 +82,9 @@ $2000 в рублях → 144,060 ₽
|
|||
Настройки → Backups откроет папку.
|
||||
- **Папка данных настраивается** — укажи OneDrive/Dropbox и листы синхронизируются
|
||||
между машинами.
|
||||
- **Поверх всех окон** (в настройках) закрепляет окно над остальными.
|
||||
- Приложение само проверяет обновления при запуске и предлагает установить —
|
||||
вручную скачивать и переустанавливать не нужно.
|
||||
- Светлая/тёмная тема, интерфейс en/ru, настраиваемая точность и разделители.
|
||||
|
||||
## Расширения
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue