107 Commits
Author SHA1 Message Date
waozi 36e9b3ad44 Pin Workbook dependencies to verified Gitea objects 2026-11-20 04:35:50 -03:00
waozi beda2d5829 Align Workbook with Kryon used by the Android host 2026-11-20 01:28:52 -03:00
waozi 4f9b096688 Pin Kryon 0.6.0 with Ziran 0.7.0 and CSS 9ee24b3f
The lock now holds one Kryon, the 0.6.0 release, and no raylib, so
Workbook builds on the same Kryon as the apps that embed it.
2026-11-18 16:12:22 -03:00
waoziandClaude Opus 5.5 020c932232 Pin Kryon 3f724419, its Ziran e0367fa9 and CSS 5120868d
The same Kryon and Ziran as CSS, Plot, Game2D, Entity, Apps and Auth,
with CSS 5120868d on that pair, so Werkzeug resolves Workbook against
one Kryon copy.

Local tests (no local overrides, through build-queue): ziran lock and
make test (service, grid, source audit, structure, conversion, Gnumeric,
hidden rows, menus, the private-Xvfb desktop app and 30 Gnumeric parity
fixtures), plus the hosted KRYON_HOSTED_UI bundle build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 00:45:32 -03:00
waoziandClaude Opus 5.5 55e72dd202 Check a new chart sheet in the hosted engine too
The native engine's WorkbookAddSheet returns the new sheet and the
portable one returns 1 or 0, so the chart command's `== null` check did
not compile in hosted builds (Werkzeug's Workbook bundle). Check each
engine's own result, as the grid already does.

Local tests (no local overrides, through build-queue): the hosted
KRYON_HOSTED_UI bundle builds and src/app.zi passes ziran fmt --check;
make build, the private-Xvfb desktop test, grid test and source audit
pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-16 22:23:25 -03:00
waoziandClaude Opus 5.5 84829a56e8 Pin Kryon 9052a642, its Ziran ebd19223 and CSS a5ab2bbe
The same Kryon and Ziran as CSS, Plot, Game2D, Entity, Apps and Auth,
with CSS a5ab2bbe on that pair, so Werkzeug resolves Workbook against one
Kryon copy.

Local tests (no local overrides, through build-queue): ziran lock, then
make test-ci (service, grid, source audit, structure, conversion,
Gnumeric, hidden rows, menus and the private-Xvfb desktop app) and make
parity (30 Gnumeric fixtures 1:1).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-16 22:06:08 -03:00
waozi e4c8d79f7d Add linked formula chart sheets 2026-11-16 21:48:06 -03:00
waoziandClaude Opus 5.5 c700d51d96 Build on Kryon 0.4.0 and Ziran 0.6.0
Kryon 0.4.0 removed the Widgets and Desktop modules, so the editor, grid
and tests import Kryon's public widget modules (kryon/box, kryon/text,
kryon/text_field, kryon/tab_bar, kryon/menu, kryon/desktop_runtime, ...)
and call their qualified Draw and Props names. Sources are formatted with
Ziran 0.6.0.

Pins: Kryon f123e8ba (v0.4.0), Ziran d17c7aa1 (v0.6.0) and CSS 3799bb09,
the same Kryon CSS, Plot, Game2D, Entity, Apps and Auth pin, so
Werkzeug resolves Workbook against one Kryon copy.

Local tests: ziran lock and make test (no local overrides) through
build-queue: service, grid, source audit, structure, conversion, Gnumeric,
the private-Xvfb desktop test and 30 Gnumeric parity fixtures.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-16 20:52:38 -03:00
waozi f4ea2205ce Align Workbook with the current Kryon pixmap lifecycle 2026-11-09 23:28:16 -03:00
waozi b25d70d164 Install the AVIF build tools in CI and build CodeQL serially
Kryon's raylib library now builds libaom and dav1d, which need nasm,
Meson and Ninja, and links the system libopus. The Test job stopped at
libaom's missing assembler.

CodeQL's autobuild ran make -j4, so two ziran processes cloned the same
package into one cache directory at once and the cache was left
unusable. Build it with one manual make instead.
2026-11-07 15:08:49 -03:00
waozi a529b14794 Style with the Kryon CSS package
kryonlabs/kss is now kryonlabs/css. Kryon, the CSS package and the toolchain move to the pins the CSS package is tested with.
2026-11-07 14:49:57 -03:00
waozi 25eca126a2 Scroll the embedded grid, pin its titles and trim it to used cells 2026-11-05 18:54:05 -03:00
waozi 182515eab9 Embed Workbook's own grid in other apps
workbook/grid draws the editor's column letters, row numbers, cell
squares, theme colors and sheet tabs for a real workbook from
workbook/engine, read-only, with column widths and count or money
formats. The editor paints its grid through the same squares. It
replaces workbook/sheet_table.
2026-11-05 16:34:09 -03:00
waozi ff3e9f7d1b Add an embeddable read-only sheet table
Other apps show CSV-like tables through workbook/sheet_table: typed
count, money and text columns, a totals row, fitted widths, one screen
of cell rectangles and CSV text, with no UI toolkit dependency.
2026-11-05 14:59:04 -03:00
waozi 63aa0bf9c2 Pin Kryon Android file opening fix 2026-11-02 10:37:56 -03:00
waozi 6da9ab84e9 Align Kryon and Kss dependency graph 2026-11-02 04:44:59 -03:00
waozi fa42c71467 Keep literal subtotal text in referenced counts 2026-10-30 14:25:35 -03:00
waozi e891d55f60 Use a subtle grid line for hidden rows 2026-10-30 14:23:00 -03:00
waozi 9c9265eea1 Add restorable hidden rows and visibility-aware subtotals 2026-10-30 14:19:16 -03:00
waozi 62ea9f6a9f Show General numbers in Gnumeric documents with two decimals 2026-10-30 12:47:25 -03:00
waozi fc13ca6153 Run hosted Workbook on Android and the web 2026-10-28 12:39:07 -03:00
waozi 1d60b001a2 Keep a decimal point after opening Gnumeric documents in comma locales 2026-10-24 03:58:42 -03:00
waozi 74f8de8100 Move to Kryon with app-named windows 2026-10-24 03:27:28 -03:00
waozi 6a5f6189ca Create the build directory before writing the hosted bundle 2026-10-22 21:29:07 -03:00
waozi ed9d009729 Use host selection and border colours in the portable grid 2026-10-20 11:50:17 -03:00
waozi 4998ce11f4 Install current desktop text dependencies in CI 2026-10-20 11:45:07 -03:00
waozi fb367689db Add compact menus and a portable Werkzeug spreadsheet editor 2026-10-20 11:42:16 -03:00
waozi 08b43b151d Keep standalone startup separate from legacy finance profiles 2026-10-20 11:04:03 -03:00
waozi 521218ca49 Pin the document window support in Kryon 2026-10-20 10:51:24 -03:00
waozi d5559b7615 Open dropped documents and use their filenames as window titles 2026-10-20 10:42:55 -03:00
waozi da4fdf02bb Use Gnumeric's native document engine for imported workbooks 2026-10-20 10:04:20 -03:00
waozi 0e454ac2ce Repin packages to the rewritten history 2026-10-19 11:51:54 -03:00
waozi d21a5e5314 Undo and redo every change with Ctrl+Z and Ctrl+Y
Ctrl+Z undoes and Ctrl+Y or Ctrl+Shift+Z redoes a finished cell edit,
paste, cut, clear, fill, and row or column insertion and deletion. Each
step keeps a whole copy of the workbook (Engine.WorkbookClone), so rows
and columns come back with the formula references they moved, and undo
selects the changed cells again on their sheet. While a cell is edited,
Ctrl+Z first takes its typing back a word at a time, or the last picked
reference; Escape leaves no step behind.

Typing after a toolbar button or sheet tab press kept only the last
character, because that control held Kryon's keyboard focus. The cell
editor now takes the focus when the grid starts an edit.
2026-10-14 19:36:34 -03:00
waozi 7199af4b64 Keep the grid's size while a button is held
A press on any cell grew the grid to the window's edge and shrank it again
on release, so in a window larger than the sheet, such as Geld inside
Harmony, every click flashed empty rows and columns. The grid now grows
only as far as a selection, a dragged fill, or a picked reference reaches.
2026-10-11 00:37:36 -03:00
waozi 9336302d97 Say nothing about saving unless it fails
Saving is automatic, so the line under the sheet tabs no longer reports
loads, edits and saves. It appears only when a save fails and is being
retried.
2026-10-10 19:37:41 -03:00
waozi c1a806c290 Loop over operand marks through a local the locked Ziran parses
The locked toolchain reads a ";" inside a for loop's string literal as
a C-style for header, so CI could not build the editor.
2026-10-10 19:11:40 -03:00
waozi b9321e3edb Point formulas at cells with clicks and drags, as in Gnumeric
While a formula is being written, a click on the grid writes that cell's
reference at the cursor and a drag writes a range; the next click
replaces it, and Shift extends it. Another sheet's tab can be opened to
pick a reference there. The edited cell shows the formula, with each
reference outlined in its own color on the grid.

Cells can be selected as ranges by dragging or Shift-clicking, and
Copy, Cut, Paste and Delete act on the range. The fill handle on the
selection's corner copies it down or across, and pasted or filled
formulas move their relative references and keep $-fixed ones.

A failed save is retried after two seconds rather than after a frame
count, which an idle window now draws more slowly.
2026-10-10 18:51:18 -03:00
waozi ee016ae007 Add row header insertion menu and complete axis selections 2026-10-09 12:58:59 -03:00
waozi 73db067461 Select entire Workbook rows and columns from their headers 2026-10-09 12:34:01 -03:00
waozi 65899675ad Open any named profile in its own data folder
WORKBOOK_PROFILE=NAME now gives every profile its own workbook in
$XDG_DATA_HOME/NAME, the way Geld already works. Harmony uses this for
Workbook profiles shown as their own apps.
2026-10-05 01:34:34 -03:00
waozi c1c5388b46 Choose the legacy ticker before changing its cell 2026-10-04 02:22:07 -03:00
waozi 61c3a59eff Save Workbook and Geld edits automatically 2026-10-01 17:31:21 -03:00
waozi 2891f86f58 Fix cell menus when activating Workbook 2026-10-01 12:07:02 -03:00
waozi 21f0071c19 Use lowercase kryon and align the project package lock 2026-09-30 17:48:33 -03:00
waozi fd6ad3ab32 Declare local flags as bool
`ziran check --lint` found 74 integer locals in the engine and quad.zi
that only ever hold 0 or 1 and are only compared with them (found,
negative, try_newton, the goto120/220/230 flags of the ported Bessel I
code, and others). They are bools now: set with true and false, or
directly with the comparison that used to be cast to s32, and tested
as `if found` and `if !found`.

Checked as described in the previous commit: fuzzing against the cell
built before both changes shows no differences, parity-test output is
identical, and make check passes on the pinned Ziran. With the current
Ziran the lint reports no flags left.
2026-09-30 08:20:56 -03:00
waozi fc33183221 Write constant dispatch chains as if-cases
Five else-if chains that compare one value with constants are now Jai
if-cases, `if op == { case 1; ... case; }`: the comparison operator in
EvalCompare, the inverter's step in PFuncInverter, the factor mode in
NtFactorEach, the 14 weekend codes in IntlWeekendDecode, and the AGM
method in quad.zi.

The generated code changes, so this was checked by behavior: together
with the next commit, the new cell agrees with the one built before
either change on 12,800 fuzzed formulas and 960 fuzzed CSV, XML and
multi-sheet workbooks (make fuzz's four modes, eight seeds each), gives
identical parity-test output, and passes make check on the pinned Ziran
and the source audit, structure and conversion tests.
2026-09-30 08:20:44 -03:00
waozi 233bab62ad Let Ziran widen values without explicit casts
`ziran check --lint` found 52 casts that only widen a whole initializer,
assignment, argument, or result, mostly a byte read as s32. They are
removed, with the parentheses they no longer need. The cast on the value
snprintf formats stays, since variadic arguments are not widened.

The change is textual only: the cell binary built before and after is
byte-identical and the editor's generated C is unchanged.
2026-09-30 07:35:04 -03:00
waozi 09a9b3d609 Pin Ziran 07f12a1, which widens numbers implicitly
This Ziran converts narrower numbers implicitly where no value can
change, so casts that only widen can go. `make check`, the source audit,
and the structure and conversion tests pass on it.
2026-09-30 07:35:04 -03:00
waozi c94e301963 Write compared characters as #char literals
The editor and engine compared bytes with character codes written as
numbers (123, 34, 61, 47, ...). `ziran check --lint` found 16 such
comparisons; they now read #char "{", #char "\"", #char "=", #char "/"
and so on.

The change is textual only: the cell binary built before and after is
byte-identical, the editor's generated C is unchanged, and `make check`
passes with the pinned Ziran.
2026-09-30 07:26:57 -03:00
waozi aab22192f4 Use Kryon's names for the shared key codes
Kryon d41ead81 names the key codes every host reports (KeyEnter,
KeyBackspace, ...), so Workbook drops its own copies, which would now
collide, and keeps only the letters it uses.
2026-09-30 01:39:51 -03:00