Commit graph

126 commits

Author SHA1 Message Date
Horizontal42
ad8e1960d7 fix: sheet drag-and-drop showed a blocked cursor and never dropped
Tauri's window-level file-drop hook (needed for dragging a .numi file
in from Explorer) intercepts WebView2's own drag-and-drop session, so
native HTML5 draggable="true" elements never get a valid drop target
inside the webview — the OS always shows "not allowed", confirmed
with an actual mouse-drag simulation before this fix.

Replaced with plain pointer tracking (mousedown/mousemove/mouseup),
the same pattern already used for the results-column divider — full
control over the cursor and the drag-over indicator, no dependency on
the webview's native DnD stack, and it doesn't touch the unrelated
OS file-drop feature at all.
2026-07-03 13:12:44 +03:00
Horizontal42
7b94f6a5b0 sheets: reorder by dragging instead of up/down buttons
Move-up/move-down felt disconnected from the result — clicking a
button and having two rows silently swap position doesn't read as
motion. Dropped both buttons for native HTML5 drag-and-drop: drag a
sheet, an accent line shows where it'll land, drop to reorder. Still
respects the pinned/unpinned grouping — dragging across that boundary
is a no-op, same as the old up/down buttons.
2026-07-03 12:57:14 +03:00
Horizontal42
5205c9fb63 design: market status matches rates styling, shows a loading pulse
#market-info had no CSS at all — different font size and color from
#rates-info right next to it, and its own hardcoded English "Market"
text ignored the language setting. Merged its styling into the same
rule as #rates-info and gave it the same .spin pulse while a fetch
is in flight, so a market refresh is as visible as a rates refresh.
2026-07-03 12:55:32 +03:00
Horizontal42
88a60c4e73 design: style the results-width slider to match the theme
It was still the bare OS-native slider — flat gray track everywhere
else in Settings is themed. Now a thin themed track with an accent
thumb that grows slightly while dragging.
2026-07-03 12:53:47 +03:00
Horizontal42
708206d245 fix: overlays only animated opening, closing snapped instantly
Settings, export menu, modal, and search all drove their entrance
with a @keyframes animation gated on :not(.hidden), triggered by a
display:none toggle — animations don't run when a property changes
away from display:none, only when the element (re)enters the render
tree. Closing just flipped straight to display:none with nothing to
watch. Replaced with opacity/transform transitions plus a delayed
visibility flip (visibility switches instantly on open, only after
the fade completes on close) — same visual effect, correct both ways.
2026-07-03 12:53:08 +03:00
Horizontal42
fd97484c4a design: pulsing indicator while rates refresh
The status bar just dimmed the "Rates" text to 0.5 opacity and left
it static for the whole fetch — easy to miss as feedback that
anything is happening. A slow pulse reads as "working" instead of
just "disabled".
2026-07-03 12:35:22 +03:00
Horizontal42
4302f7025c design: keyboard focus ring on form fields
Doc title, search input, and settings inputs/selects either zeroed
out the default outline or never set one — Tab-only navigation had
no visible indicator of what's focused. :focus-visible keeps mouse
clicks silent and only rings for keyboard focus.
2026-07-03 12:34:27 +03:00
Horizontal42
ec8b2f6448 design: thin scrollbars matching the theme
Default Windows scrollbars were chunky and out of place next to the
minimal chrome elsewhere. WebView2 is Chromium under the hood, so a
plain ::-webkit-scrollbar override works everywhere without JS.
2026-07-03 12:33:51 +03:00
Horizontal42
92dd4e3125 extend subtle animations from settings to the rest of the app
Sidebar collapse now transitions width instead of snapping via
display:none. Export menu, the modal, and the search overlay all get
a short pop-in (scale + fade) matching the settings panel's motion.
Buttons, doc-list items, and status-bar text ease their hover/color
changes instead of snapping.

Left alone on purpose: the results overlay (re-rendered on every
keystroke — animating it would feel laggy, not smooth), the
autocomplete tooltip (CodeMirror's own timing), and the column-resize
drag handle (wants instant feedback while dragging).
2026-07-03 12:25:53 +03:00
Horizontal42
702670e08d settings: subtle open and tab-switch animations
Settings panel pops in (scale + fade, 0.15s) instead of appearing
instantly; switching tabs fades the new panel in (0.12s); the tab
buttons themselves transition their background/color on hover and
selection instead of snapping. CSS-only — @keyframes animations run
even from display:none, so no JS timing/exit-animation complexity.
2026-07-03 12:14:26 +03:00
Horizontal42
e5ef1164cc settings: show the running app version
Updates tab, below the check-update button. Reads from
tauri.conf.json via getVersion() in a real build (the source of
truth for what's actually installed); falls back to package.json's
version under vite dev, where there's no Tauri runtime to ask.
2026-07-03 12:13:01 +03:00
Horizontal42
6f190c7245 docs: tabbed settings, auto-update toggle and diagnostics 2026-07-03 12:03:58 +03:00
Horizontal42
1e06281f5e settings: tabbed panel, date format, update controls
The flat settings list had grown to 14 fields plus footer buttons —
split it into General / Format / Data / Updates tabs (same pill style
as the pinned-doc sidebar, active tab gets the selection color).

Wired the date-format setting into the engine, and reworked update
checks per an actual bug report: a boot-only check is easy to miss on
a tray app that can run for weeks without a cold restart, and every
failure was swallowed silently with no logging at all. Now: failures
are logged (console.warn) and successful "no update" checks say why
(console.info, current version vs. latest published release) so the
next report has something to go on; checks also rerun every 6 hours;
Settings has both a manual "Check for updates" button (reports back
via toast) and a toggle to turn automatic checking off entirely —
manual checks keep working either way.
2026-07-03 12:00:39 +03:00
Horizontal42
5af7c66c3c refactor: pull cross-sheet search and PNG export out of main.ts
Both were self-contained enough to live in their own modules —
src/ui/search.ts (Ctrl+F overlay, text and result-value queries) and
src/ui/export.ts (render the sheet + results to a PNG, clipboard or
file). Trims main.ts by about 150 lines.

Also fixes a real bug while it's in there: the PNG export's clipboard
fallback did btoa(String.fromCharCode(...bytes)), which blows the
call stack on large sheets (spreading a big array as call arguments).
Chunks the conversion in 0x8000-byte pieces instead.
2026-07-03 11:57:33 +03:00
Horizontal42
8b4e6fc0fe market data: switch to Yahoo v8 chart, drop delisted tickers
v7/finance/quote returns 401 now — Yahoo stopped issuing anonymous
clients the cookie+crumb pair it requires. v8 chart still answers
without auth, one symbol per request instead of one bulk call.
Also dropped SBER/GAZP from the tracked symbols; Yahoo delisted
Russian tickers in 2022, so those two always missed anyway.
2026-07-03 11:51:40 +03:00
Horizontal42
d0d13ec1c0 historical rates: point at frankfurter.dev, fetch on cold start too
api.frankfurter.app 301-redirects to frankfurter.dev now, and the old
host is flaky over reqwest/rustls-tls — talk to the new one directly
(Rust backend, the vite-dev web fallback, and the CSP allowlist).

Separately, a sheet reopened on boot with "on 2024-01-01" in it never
fetched historical rates at all: the fetch only ran from switchDoc()
and the editor's onChange, and the editor's initial text is seeded
directly, bypassing both.
2026-07-03 11:46:47 +03:00
Horizontal42
d28ab6d095 style: cargo fmt src-tauri
Whitespace only, no behavior change — makes the next couple of Rust
commits smaller and easier to read.
2026-07-03 11:44:36 +03:00
Horizontal42
0b2293f92f engine: configurable date formats, both input and display
Besides ISO, the lexer now accepts D.M.YYYY / M/D/YYYY literals
(31.12.2024, 12/31/2024) with a round-trip validity check so
out-of-range components (2026-13-45, 32.13.2024) fall back to plain
arithmetic instead of silently rolling over to a nearby valid date —
that rollover bug affected ISO literals too, not just the new forms.

Day/month order for ambiguous literals and display layout both come
from a new dateFormat setting (system/iso/dmy/mdy); "system" resolves
once via Intl against the OS locale. Intl.DateTimeFormat instances
are now cached by options key instead of rebuilt on every render.

App-side wiring (settings UI, persistence) comes in a follow-up commit.
2026-07-03 11:35:47 +03:00
Horizontal42
3a264c4a3f registry: split buildRegistry into per-category functions
The 290-line function is now registerCoreVocab / registerUnits /
registerAreaVolume / registerCurrencies / registerExtraUnits /
registerCrypto / registerCompletions, called in the same order —
phrase-collision priority depends on that order, unchanged. Pure
reorganization, no behavior change.
2026-07-03 11:31:02 +03:00
Horizontal42
af83ac6539 a URL in a line got truncated at the comment marker
rawLine.indexOf("//") matched the "//" inside "https://..." too, so
any line with a URL lost everything after it. A comment now only
starts at the beginning of a line or after whitespace.
2026-07-03 11:30:45 +03:00
Horizontal42
a9aaff5490 "time in Europe/Berlin" dropped the second word
Two independent traps. The noise filter only keeps word tokens right
after a conversion token (in/as/...); any other token type resets
that, so the "/" in a slash-form IANA id ("Europe/Berlin") reset it
before the parser ever saw "Berlin". The word-collecting loop in
parseTarget() had the same blind spot even once the token was there.
Both needed the same exception, or "Europe/Berlin" still degrades to
just "Europe".
2026-07-03 11:25:56 +03:00
Horizontal42
ef6244dc84 exp() silently evaluated as a no-op
"exp" was also listed as a scientific-notation alias ("123456 in
exp"). Phrases register first-come-first-served, and that alias was
registered before the exp() function, so the function itself never
got the phrase — exp(1) parsed as a bare (1) and returned 1. Drop
exp from the scientific-notation aliases; sci/exponent/exponential
still work.
2026-07-03 11:25:29 +03:00
Horizontal42
deea37ba21 multiplying same-dimension quantities keeps a sane unit
"2 kg * 500 g" multiplied the raw numbers (1000) and slapped the
left unit on top, giving "1000 kg" instead of "1 kg". Convert the
right operand into the left unit first for same-dimension products;
cross-dimension multiplication ($12 * 3, 5 hours * 2) is unaffected.
2026-07-03 11:25:01 +03:00
Horizontal42
df7761401b random() with no arguments threw before reaching its own branch
evalCall checked args[0] and threw "needs an argument" before ever
falling into the random case, which is the one built-in that's
valid with zero args. Dispatch it first.
2026-07-03 11:21:24 +03:00
Horizontal42
01697daaac bump version to 1.1.0 2026-07-02 06:20:32 +03:00
Horizontal42
5ed74c2cd6 workspace: fix cache-stability test to actually exercise the cycle-poisoning fix 2026-07-02 06:04:04 +03:00
Horizontal42
0345d2a33f workspace: don't cache exports from a cycle-interrupted evaluation
In an A<->B cycle, exportsFor(B) run while A is mid-resolution would
compute a wrong export set (assignments dropped by the nested
"circular reference" error) and cache it anyway. Later queries then
served that stale, cycle-broken result even after the cycle-causing
outer call had unwound, giving inconsistent error messages across
repeated evaluations of the same cyclic setup.

Skip caching whenever any line in the result carries a "circular
reference" error - that's a precise, local signal the pass was
cycle-affected, so the sheet gets re-evaluated fresh until an edit
actually breaks the cycle. Normal (non-cyclic) caching is untouched.

Also adds a positive-path test confirming LineResult.error stays
undefined on an ordinary successful line, and a workspace-level test
proving a genuine cycle now reports a stable error across repeated
queries.
2026-07-02 05:50:40 +03:00
Horizontal42
26a6bc283b document cross-sheet references 2026-07-02 05:43:33 +03:00
Horizontal42
90c19e343f show unresolved cross-sheet references as a visible #ref? marker 2026-07-02 05:41:17 +03:00
Horizontal42
9d8f977c46 wire cross-sheet references into the editor and document lifecycle 2026-07-02 05:38:02 +03:00
Horizontal42
8fb9ee3a31 workspace: sheet dependency graph, export cache, cycle guard, rename rewrite 2026-07-02 05:32:12 +03:00
Horizontal42
677f940043 engine: @Sheet.key cross-sheet reference syntax and resolver hook 2026-07-02 05:26:25 +03:00
Horizontal42
b509a65fc5 docs: update README and ARCHITECTURE for v2.0 features 2026-07-01 22:32:03 +03:00
Horizontal42
fbeca06f2e historical rates: 1000 USD in EUR on 2024-01-01 via frankfurter.app 2026-07-01 22:23:35 +03:00
Horizontal42
d5f458dce3 goal seek: ? * 1.2 = 1000 → 833.33 2026-07-01 22:11:55 +03:00
Horizontal42
bbbcc0497c export sheet as PNG — clipboard + file-save fallback 2026-07-01 20:44:04 +03:00
Horizontal42
661a4500ca live market data via Yahoo Finance: AAPL TSLA NVDA etc 2026-07-01 20:40:40 +03:00
Horizontal42
f1427d08f3 search by result value: >1000, <50, =100, ~100 2026-07-01 20:33:20 +03:00
Horizontal42
4b5381d7e7 sheet organization: pin and reorder with up/down arrows 2026-07-01 20:31:43 +03:00
Horizontal42
f8f9095fca add ISO date literals and days until/since 2026-07-01 20:27:55 +03:00
Horizontal42
eff90d3219 add chart/spark sparkline keyword — renders inline SVG in results column 2026-07-01 20:05:24 +03:00
Horizontal42
1d77ee45d8 add random() with deterministic line-seeded PRNG 2026-07-01 20:01:40 +03:00
Horizontal42
532c3265ad add block aggregates count/min/max/product, Ctrl+W close sheet 2026-07-01 19:58:54 +03:00
Horizontal42
55a2b6a492 bump version to 1.0.1 2026-07-01 17:37:43 +03:00
Horizontal42
0d0e6901b9 fix vite dev server: bind 127.0.0.1, ignore src-tauri/target
Vite defaulted to an IPv6-only bind, so tauri dev's readiness probe
(which checks 127.0.0.1) waited forever even though Vite was up.
Separately, its file watcher was watching Rust's build output and
crashed on a locked .pdb file mid-compile.
2026-07-01 17:35:26 +03:00
Horizontal42
f33381adc2 force monochrome rendering for the search icon
The magnifying glass emoji defaults to full-color presentation,
standing out next to the plain-glyph settings/sidebar buttons; the
U+FE0E text-presentation selector makes it inherit color like the rest
of the titlebar.
2026-07-01 17:25:03 +03:00
Horizontal42
cfe5336aa3 serialize release matrix builds to fix duplicate-release race
Running x64/arm64 tauri-action in parallel let both jobs race on
find-or-create-release for the same tag, producing two release objects
that each only got their own arch's assets (and a latest.json missing
the other platform's entry, breaking auto-update for it).
2026-07-01 16:28:52 +03:00
Horizontal42
a2dcd6ebba retag as v1.0.0 — first public release under PolyForm Noncommercial 2026-07-01 16:02:00 +03:00
Horizontal42
055c0b6144 document search, always-on-top, auto-update, arm64 build 2026-07-01 15:45:58 +03:00
Horizontal42
d168bf9af9 auto-generate release notes from commit log since last tag 2026-07-01 15:41:53 +03:00