chiark / gitweb /
changes since 1.1.0
[otter.git] / CHANGELOG.md
1 Version 1.2.0 - 2022-06-21
2 ==========================
3
4 General changes to game and UI
5 ------------------------------
6
7  * Counting pickup decks, hands, etc., now include un-occulatable
8    pieces in their count, not only occultable ones.  This means
9    counting piles can now be used to count unoccultable pieces.
10
11  * Fiddle with CSS to try to get mouse cursor to update more promptly.
12    (This is still not perfect, probably due to browser misbehaviour.)
13
14  * otter(1): When printing game access URL, say in message that it's private
15
16  * Change monospace font to DejaVu Sans.  Reportedly the previous font
17    was not always available, causing the chess clock to perhaps misrender.
18
19  * Add piece descriptions to more messages.
20
21  * UI improvements relating to selecting, wresting, and dragging:
22    - Mouse cursor shows differently when in wresting mode.
23    - Allow backspace to delete typed special count.
24    - Leave wresting mode when the user presses space.
25    - Allow rectangle select drag to start on pinned pieces. hands, etc.
26
27 Otter CLI
28 ---------
29
30  * Provide set-access subcommand.  Previously the game ACL could only
31    be adjusted by resetting the whole game, or abstruse alter-game-* runes.
32
33  * fix typo in usage message part concerning `otter reset`.
34
35 Game client UI fixes
36 --------------------
37
38  * Split a banknote (currency) when the user makes a counted click,
39    even if they are currently holding the note itself.
40    (previously this would simply unselect it).
41
42  * When pieces are newly inserted (inclidng on game reset), properly
43    record their description (for use in messages) and bbox.
44    Previously, the description would show as "undefined" until page reload.
45
46  * When pieces are deleted (including on game reset), properly remove
47    the client's idea of any active occultations they might have had.
48    Previously, "ghost" occultations would remain, causing dotted-line
49    grasp highlighting in places where the hands etc. were.
50
51  * When a player changes their nick, update this in the clients, so
52    that the new nick appears in the info pane and in the various affordances.
53
54  * Fix minor bugs in mouse click handling corner cases.
55
56 Demo (testing) game changes
57 ---------------------------
58
59  * Increase table size.
60  * Add a pickup deck.
61  * Fix a misindent in the spec file.
62
63 Internal and testing chnages
64 -----------------------------
65
66  * Server/client protocol change: Rename AddPlayer to SetPlayer.
67  * apitest: Suppress some hyper log messages by default.
68  * Add two debug console.log's to the JS code.
69  * Refactorings and internal comment updates.
70
71
72 Version 1.1.0 - 2022-05-26
73 ==========================
74
75 Bundle format
76 -------------
77
78 Introduced bundle format versions, and bundle format version `2`.
79 Bundle format version `1` is still supported.  There are significant
80 changes and improvements in version `2`, available by writing
81 `format=2`.  See "Bundle compatibility" in the documentation.
82
83  * Handling of piece size and angle specification overhauled.
84  * New and better template substitution syntax.
85  * Fixed piece angle specification in game specs.
86
87 Breaking change to otterlib CLI program
88 ---------------------------------------
89
90  * otterlib (the library preview utility, not normally needed for bundle
91    development) now needs to know the nwtemplates directory (so it can
92    properly process etc. magic library items).
93
94 New features
95 ------------
96
97  * Dice, via the `Die` piece type.
98  * Currency (money, and similar things), via the `Currency` piece type.
99  * Shape libraries can provide canned "magic" items
100    (which are then based on the library's own image(s).
101  * `stack_pos` parameter for `PickupDeck` pieces, specifying where the
102    "neat pickup deck" should appear, so it doesn't have to central.
103  * otter CLI client: Allow uploading a directory directly as a
104    bundle zipfile (helpful for bundle development).
105  * Include piece description in some log messages.
106
107 Fixes and improvements
108 ----------------------
109
110  * Do not randomly panic when trying to print truncated debug output
111    for non-ASCII piece HTML.
112  * Set default fonts for SVG processing: in bundle SVGs, at all (so
113    that text is not elided); in builtin libraries, more widely
114    (without effect on the existing pieces).
115  * Notice errors during JS startup, and display them.
116  * Correct sense of pin/unpin log message.
117  * Shape library previews: fix (and improve) the HTML (from otterlib).
118  * Fix a tiny rendering error in arrowheads.
119  * Test suite: `childio`: work around a Linux kernel race bug: you can
120    sometimes reap a child and then write to its pipe without EPIPE.
121  * Build system: run miri with +nightly, so that tests work when stable
122    Rust is the default.  Document that these tests require nightly.
123  * Correct an error message about JSON serialisation.
124  * Remove some direct stderr debug prints from production code.
125  * Log message colourisation on a tty now leaves the logs more readable.
126  * Some improvements to bundle/shapelib loading error messages.
127
128 Docs
129 ----
130
131  * Dcouemnt the semver stability promises.
132  * Publish the docs to an Otter-version-specific directory, so that
133    old docs versions are retained.
134  * Fix some formatting errors and typos.
135  * Correct some leftover todos.
136  * Clarify extra field syntax in shape library catalogue `files` entries.
137
138 Protocol and model enhancements
139 -------------------------------
140
141  * `multigrab`: pieces that can capture the number of pieces the user
142    says to grab, and instead handle the whole multigrab operation.
143  * `fastsplit`: pieces that can be split and merged during play
144    without having to rewrite the aux save file (containing SVG images).
145  * Non-mixing OccultIlk, for pieces which always remain distinguishable.
146  * Special rendering instructions, for pieces whose display involves
147    bespoke code in the TypeScript.
148  * OpOutcomeThunk system to allow piece implementations to be reinvoked
149    with an ability to make much wider mutable borrows.
150
151 Build system, internal changes, etc.
152 ------------------------------
153
154  * Update to Rust 2021.
155  * Break out an additional `otter-support` crate (to try to
156    improve incremental build times).
157  * Use `ambassador` macro crate to help delegate trait impls.
158  * When formatting the Rust docs, pass `--document-private-items`.
159    (The Rust doc tree is for Otter developers.)
160  * Rationalised and sanitised the item import (`use`) practices.
161  * Refactoring in the test suite to support new tests.
162  * Fake time facility for testing.
163  * Concrete protocol: more Quiet PieceUpdateOps.
164  * Work around inkscape extension fail-to-save bug (seen in recolour).
165  * Reorganised and shuffled about `Outline` types.
166  * Avoid saving various things to savefiles that aren't needed
167    (mostly `None`s).
168  * Add some internal documentation about `ModifyingPieces`.
169  * Code motion to better organise shapelib.rs and utils.rs
170  * Centralised some UI properties in ui.rs.
171  * Made some type names more consistent (eg `GOccults`, `Catalogue`).
172  * Renamed some PacketFrame types etc. from MgmtChannel.
173  * Other minor improvements.
174
175
176 Version 1.0.0 - 2022-04-02
177 ==========================
178
179 Significant changes
180 -------------------
181
182  * Compile on stable Rust.
183  * Uses actix-web rather than Rocket (should be similar in overall
184    functionality but there may well be behavioural changes).
185  * Always listen on localhost:8000 by default regardless of `debug` config.
186    But, support explicit configuration of listening addresses.
187  * Do not sometimes leak (in game log) piece identity of face-down cards.
188
189 Minor improvements
190 ------------------
191
192  * Add short crate-level docs with reference to website etc.
193  * Fix inconsequential misacceptance of some odd-length hex byte strings.
194  * Fix some almost-incosequential short write bugs (might manifest as races).
195  * Typo fix in one error message.
196
197 Build system
198 ------------
199
200  * Turn on integer overflow checks for release builds.
201  * Don't override environment's SPHINXBUILD or NAILING_CARGO.
202  * Update dependency versions.
203  * Skip some unnecessaary miri runs of certain tests.
204  * Support for controlling the Rust version via RUST_VERSION.
205  * `make deploy` MUSL build is in release mode by default.
206  * Document that build now requires 6G rather than 10G.
207
208 Internal improvements
209 ---------------------
210
211  * Drop wee-alloc as allocator from WASM.
212  * Many internal code style improvements prompted by rust-clippy.
213  * Remove some unused internal bits and bobs.
214  * Require layout parameter in session URL loads.
215  * Miscellanous Other cleanups.
216
217
218 Version 0.7.3 - 2021-07-25
219 ==========================
220
221 Build system bugfixes
222 ---------------------
223
224  * `cargo` publication in `make-release` uses better pre-clean
225    approach.  (Removes some junk from caago packages.)
226
227 drop our own directory from cargo.nail
228
229 Version 0.7.2 - 2021-07-25
230 ==========================
231
232 Bugfixes
233 --------
234
235  * Complete overhaul of Z coordinate (stacking order) handling, including
236    reworked Z lowering algorithm (`b` key function).  Changes and
237    consequences include:
238
239     - On page load, use player's view of the Z coordinate for sort order (Z
240       display order) of occulted pieces, not actual Z (!)  avoiding
241       incoherent client state and arbitrary behaviours eg:
242     - Now we no longer ever raise a piece when user asks to lower (!!)
243     - Occulters (hands and decks) more uniformly try to be low down.
244     - e.g. user will no longer accidentally put card under their hand (!!)
245     - Do not derange relative ordering of multiple lowered pieces.
246     - Fix a logic errors and panics in Z coordinate handling which
247       might prevent some attmepts to lower (or, mayby, raise) pieces.
248     - When the user asks to raise but nothing can be raised, log a message.
249     - Automatically lower occulting pieces when they are enabled, and
250       pieces which are being pinned (insofar as reasonable); this
251       significantly reduces the probability of mysterious trouble
252       lowering a piece ("would disturb a piece held by another player").
253
254  * Substantial overhaul of error handling for problems detected when
255    processing client API requests:
256
257     - It should no longer be possible for the user to cause JS exceptions or
258       other lossage merely by asking to do things which it happens that the
259       server (unbeknownst to user or client script.ts) won't permit.  Report
260       these errors in the user-facing client log window, instead.
261     - New discussion of inapplicable-api-op etc. error handling in
262       `PROTOCOL.md`, and implementation of the new scheme.
263     - Principled client decisions about what to show the user - which
264       things are errors, which things are to be rported as conflicts, and
265       generally what to put in the user-facing message log.
266
267  * Do not re-raise things during drag if the user explicitly lowered
268    them with `b` (since the user grasped them).
269
270  * Fix JS exception if user selected multiple pieces which used the same key
271    for different purposes.  (Even transiently, for example by selecting
272    multiple hand repositories and claiming them all - you'd briefly have `C`
273    for claim for some, and `C` for unclaim for others, triggering the bug.)
274
275 New features
276 ------------
277
278  * New general `t` keystroke to bring a piece to the top of the
279    stacking order.
280
281  * Player hands now show the count of contained pieces.
282
283  * New loosely synchronised approach to "regrab", to enable a player
284    to release a piece (eg, a card they have just drawn) and
285    immediately, asynchronously, regrab it, while the server is sending
286    an update (eg resulting from an occultation status change).  I.e.:
287      - You can now draw a card into your hand in Mao and immediately regrasp
288        it, planning to decide whether to play it - and you can do the regrasp
289        without waiting for the server to show you the card.  Your regrasp and
290        the server update run concurrently.
291
292 Other user-facing changes
293 -------------------------
294
295  * `vatikan` game spec: Make the two hand repositoriess at the bottom bigger.
296  * Deck card count uses a monospaced font.
297  * Demo game: Add a label to the test hand.
298
299 Internal and development/test changes
300 -------------------------------------
301
302 New tests (and new checks in existing tests):
303
304  * Test Z lowering algorithm with new test facility.
305  * Test handling of UI actions which server decides (unpredictably
306    from client POV) cannot be performed.
307  * Add more tests of the zcoord module.
308  * Webdriver tests: check that there were no JS exceptions.
309  * Add in-browser testing of inapplicable-api-op error handling.
310  * Test new regrab feature, and adjust tests to cope with regrab
311    feature's somewhat different reporting of simultaneous-drag-attempts.
312  * Tests do a consistency check of the Z coordinates vs the in-SVG
313    subelement stacking order.
314
315 Testing, supporting changes:
316
317  * New jstest facility for running for-browser JS in a nodejs
318    environment with some cheesy mockups.  (New `otter-nodejs-tests`
319    crate; involves a separate invocation of `wasm-bindgen`.)
320  * Webdriver tests: pass window size arguments to firefox so we
321    get a window big enough for the provided game specs.  Involves
322    wrapper script for `firefox`.  Also Xvfb server screen size.
323
324 Internal and protocol improvements:
325
326  * New "loose" update (api op) concept to support new regrab feature.
327  * Fix a wdriver synch race which could lead to spurious tests failures.
328  * Improve defensive programming in the zcoord module.
329  * Abolish the incoherent `OnlineError` error type and replace it
330    with `Inapplicable` and `Fatal`.
331  * Abolish old incoherent and ununused `conflict_expected` in client JS.
332  * Improved debug output in various places (when enabled or in tests).
333  * Cleaned up a few flabby idioms in some tests.
334  * Promote some debugging support to otter-base.
335
336 Internal docs improvements:
337
338  * Fix some bogus links in internal docs.
339  * Add some more internal documentation to the zcoord module.
340  * Tidy up some leftover comments etc.
341  * Typo and formatting fixes in `PROTOCOL.md`.
342  * Fixes to `cargo doc` build.
343
344 Build system and dependencies:
345
346  * Update many dependencies to new versions.
347  * Tested build with Rust nightly-2021-07-15.
348  * Dependencies on tera templating engine slightly rationalised.
349  * Maekfile: avoid rebuilding the otter cli over and over again,
350    by touching it when we rebuild it.
351
352
353 Version 0.7.1 - 2021-06-09
354 ==========================
355
356 Bugfixes
357 --------
358
359  * `make shapelib` builds, and reports a URL for, the actual
360    documentation for shape library layout and spec syntax, not to an
361    obsolete location.
362
363 Installation and deployment changes
364 -----------------------------------
365
366  * Better documentation of how to install just the command line
367    game management client (eg for use via ssh).
368
369  * Update Rocket dependency in Cargo.lock to one which builds with
370    recent Nightly Rust.
371
372  * Update usvg dependency in Cargo.toml to a version with revised
373    less-insane command line parsing, and adjust all calls to it.
374
375  * Updated other dependencies.
376
377  * Work around a cargo bug which breaks the docs build:
378     https://github.com/rust-lang/cargo/issues/9564
379
380 Installation and deployment changes
381 -----------------------------------
382
383  * Improvements to release checklist and release script.  Notably,
384    add a checklist item for checking the build on recent Nightly.
385
386
387 Version 0.7.0 - 2021-06-08
388 ==========================
389
390 New features
391 ------------
392
393  * Game spec files can now be processed with Tera for templating.
394
395  * ssh-based access for `otter` cli, including appropriately-
396    restricted access via authorized_keys in the server role account,
397    and a mechanism for self-service public key management.
398
399  * `otter` cli can now read a preferences file
400    (`~/.config/otter/prefs.toml` by default) to allow pre-configuring
401    commonly-required command line options like `--game` and `--ssh`.
402    See `otter --help` for documentation.
403
404  * Mao and Penultima slightly updated (and, those game specs now
405    use the new templating feature).
406
407 Bugfixes
408 --------
409
410  * UI: When multiple pieces are selected and are to be raised (whether
411    by explicit request, or because of drag distance), their relative
412    ordering is preserved.  So dragging a group of pieces no longer
413    scrambles their z order.
414
415  * UI: When the SSE connection auto-reconnects, do not declare it an
416    error and suggest to the user that reloading might help.  Instead,
417    simply hope that it is going to be OK (since it generally is).  If
418    the SSE connection declares failure (state 2), report a scarier
419    message.
420
421  * Docs: Fixes to some documentation errors (including a fix
422    contributed by Simon Tatham).
423
424  * CLI etc.: Improve a number of error messages; in particular,
425    replace several "debug prints" of error messages with proper
426    formatting, and print a better program kname.
427
428  * CLI: Much better handling of stdout write errors.
429
430 Installation and deployment changes
431 -----------------------------------
432
433  * The `otter` command line utility is now in its own Rust package
434    `otter-cli`.
435
436  * Better logging by server of events on command connections.
437
438 Internal and development changes
439 --------------------------------
440
441  * make-release now polls crates.io's github view to work around
442    cargo/crates.io bug https://github.com/rust-lang/cargo/issues/9507
443    and has a release checklist in it.
444
445  * Some internal renamings for clarity, especially regarding
446    Authorisation proof tokens.
447
448  * Reworked the types involved in management command channels, to
449    use a different stacking of read/write adapters.  In particular,
450    a new `childio` facility for handling conversations with a child
451    process (in support of using `ssh` as a command conn transport).
452
453  * `otter` cli no longer uses println!.  Instead we have a special
454    wrapper for stdout which handles the errors and buffering for us.
455
456  * `otter` cli subcommand dispatch made nicer and the program's code
457    broken out into multiple files.
458
459  * Internal apitest case code restructured somewhat.
460
461
462 Version 0.6.0 - 2021-05-23
463 ==========================
464
465 New features
466 ------------
467
468  * Support uploading bundles of game materials, so games can be played
469    that are not playable with Otter's provided piece libraries.
470
471  * New `vatikan.game.toml`, suitable for many variants of
472    Manipulation Rummy.
473
474  * New `private.table.toml` and `same-scope.table.toml` for
475    less-public games.
476
477 Command line usage changes, etc.
478 --------------------------------
479
480  * otter(1) now takes the game name using a `--game` (`-g`) global
481    option rather than a per-subcommand positional argument.
482
483  * Library listing, piece identification, and so on, changed,
484    including changes to `otter library-add` and `otter library-list`.
485    Specifically, per-game libraries mean that `library-list` now
486    needs the `--game` option.
487
488  * otter(1) and otterlib(!) now honour `OTTER_CLI_LOG`
489    (in Rust env_logger format).
490
491  * otter(1) no longer acts on change_directory server config
492    setting (but still resolves paths in config relative to that dir).
493
494  * Much better reporting of errors, especially from otter(1).
495    Previously even straightforward errors would result in a controlled
496    `panic`; now a prettier message is printed.
497
498  * Default table size is now 300,200 (like `penultima` and `mao`; was
499    400,200).
500
501   * otter(1) can be used to issue adhoc management commands supplied
502     on the command line in JSON or RON format.
503
504 Bugfixes
505 --------
506
507  * Fix a serious bug with acl handling which might allow players who
508    can access a game more access than intended.
509
510  * Occult ilks are properly sorted out during piece load and game
511    save/load.  Previously a game with occulted pieces might not be
512    reloadable.
513
514  * Test suite might previously fail with EBADF due to off-by-one error
515    in fd cleanup routiine.
516
517 Documentation
518 -------------
519
520  * Document uploadable bundle format.
521
522 n * Document game and piece spec format.
523
524  * Document shape library catalogue format (previously this was done
525    with rustdoc annotations on Rust structs used with serde, which
526    produced incomplete and very hard to understand information).
527  
528  * De-emphasize docs for for amending the builtin shape libraries;
529    suggest making bundles instead.
530
531  * Examples, of game specs, shape libs, buncdles.
532
533 Installation and deployment changes
534 -----------------------------------
535
536  * usvg is now built shipped by the otter build system.
537
538  * server-config.toml can specify the path to `usvg`, `libexec`,
539    etc.
540
541 Compatibility notes
542 -------------------
543
544  * The otter(1) command line interface has changed and many common
545    operations need to be specified differently.
546
547  * The management API protocol has completely changed.  Old otter(1)
548    clients will not work.
549
550  * Savefiles from older versions of Otter are not loadable.
551
552 Internal and development changes
553 --------------------------------
554
555  * Change CLI to server management wire protocol to binary-framed
556    MessagePack (was newline-framed JSON).
557
558  * Update dependencies.
559
560  * Build system and test suite improvements and fixes.
561
562  * Move game spec parsing from client to server.
563
564  * Better error messages, especially from otter(1)
565
566  * Tests have better error reporting and output capturing.
567
568  * Various substantial refactorings to tests.
569
570  * Test the supplied game specs.
571
572  * Test game save/load.
573
574  * Use the sphinx feature sphinx.ext.autosectionlabel for xrefs.
575
576  * Server management channel now has an idle timout.  Should not be
577    relevant with the supplied otter(1) client.
578
579  * Much internal refactoring, new macros etc., to support the other
580    work.
581
582  * Reset game (game spec parsing and implemnetation) is now
583    done in the server rather than the client.
584  
585  * Improvements and bugfixes to `make-release` and `update-version`
586    scripts.  Fix anomalous (but working) `Cargo.toml` version
587    dependency syntax.
588
589 Version 0.5.1 - 2021-04-19
590 ==========================
591
592 This was the first public release.
593
594 [comment]: # Local variables:
595 [comment]: # mode: text
596 [comment]: # End: