Commit Graph

4 Commits

Author SHA1 Message Date
dev a360238a95 Write the comments in both languages, part one
The comments in this service were written in English alone, while the
library it belongs to writes every comment in English and then in Chinese.
The smaller modules are done here: the library root, the bilingual text,
the shared state, the embedded content and assets, the three HTTP modules,
the entry point, the test seams, the tool labels, and the interface
catalogue reader.

A doc comment carries the English text, an empty doc line, and then the
Chinese. An inline comment carries the English line and then the Chinese.
Both are how the library already writes them.

The empty doc line matters and was wrong at first. A blank line between
the two halves is not the same thing: it detaches the second half from the
item it documents, and the compiler says so. A hundred of them were
rewritten as empty doc lines.
2026-10-02 13:17:41 +08:00
dev ff69c1cd63 Move every test out of src, as apsis-rs does
The service is a library with a thin binary over it, which is what makes
the move possible: an integration test is a separate crate and reaches
only what the library makes public, so the modules now live in
`src/lib.rs` and `main.rs` is the entry point. `src/` holds no test
code, which is the shape `apsis-rs` already has.

Eleven items are internal to a module and a test reaches them anyway.
Those stay `pub(crate)` where they are defined and are offered through
`src/testkit.rs`, which is the one place a caller is expected to look for
them. A wrapper is also the only way to offer a private thing outward:
Rust does not let visibility be widened twice, so a `pub(crate)` item
cannot be re-exported as `pub`. That keeps the seams in one file instead
of scattering them through the modules under test.

The 146 module tests and the 23 end to end tests all still run, which is
the number this move had to preserve: the 146 are spread over eighteen
files in `tests/`, one per module that had them.
2026-10-02 01:56:21 +08:00
dev 50d6ecc9fd web: scroll to the top on navigation, organize the interface by layer, and set the formulas in the tool output
A page change did not move the scroll position, so following a link from
the bottom of a long document landed in the middle of the next one. The
scroll now follows the path rather than the fragment, so a filter applied
to the page a reader is on leaves them where they are. The browser fires
`popstate` for a fragment navigation as well as for a traversal, so
there is no event that means "this was a traversal" on its own, and going
back starts at the top rather than where the reader left.

The interface index listed fifteen crates in one grid. It is now grouped
by layer, with the title and order the concept documentation already
declares, and a card shows the opening sentence of the crate summary
rather than the whole of it, which is what made the cards four hundred
pixels tall.

A tool result showed its column headings, scalar labels and notes in the
reader's language, but left the table body in English. Text cells are now
looked up as well. Units are written with a power, and are set as one.

A tool description is Markdown, so it is now rendered as such, as are the
parameter help and the notes. A formula written between dollar signs is
set the same way in both places.
2026-10-01 22:46:56 +08:00
dev b7e5222bcd web: add a bilingual interface with Chinese as the default 2026-09-27 09:13:52 +08:00