Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/skills/desktop-e2e-testing/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Use when writing, running or debugging an end-to-end journey of the

# Desktop e2e

`CONTRIBUTING.md` → "The end-to-end journeys" says how to run, watch, mend and extend them; `docs/architecture/testing.md` → "The journeys, on the assembled window" lists the fourteen and what the driver does. What is worth knowing before touching one:
`CONTRIBUTING.md` → "The end-to-end journeys" says how to run, watch, mend and extend them; `docs/architecture/project/testing.md` → "The journeys, on the assembled window" lists the fourteen and what the driver does. What is worth knowing before touching one:

- Build the flavour first, every time `crates/` changed: `cargo build -p app --features e2e --target-dir target/e2e` (its own target directory: no other build overwrites it). Then `cargo test -p e2e --test NN_name` for one journey, `cargo test -p e2e` for all — what CI runs on each OS. `cargo test --workspace` runs with `--exclude e2e`.
- A journey is `e2e/tests/NN_name.rs`: one `#[test]` of named `step`s, what the person does then what they see. A nominal path goes into the journey it belongs to, as a step; a new file only for a new goal (15 at most). Branches, edge cases and error codes are unit tests'.
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/devnotes-security-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Checklist on the change (`git diff main...`, and `git diff HEAD` for what is not
6. **Dependencies**: see `dependency-audit` if `Cargo.toml`/`package.json` changed.
7. Report findings by severity with file:line; state what you did not check. Do not auto-fix crypto findings.

Reference: `docs/architecture/libraries.md` → "Encryption at rest".
Reference: `docs/architecture/core/libraries.md` → "Encryption at rest".
2 changes: 1 addition & 1 deletion .claude/skills/egui-ui/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ D32): read a screen's component and its SCSS before changing it, and its capture
or the index (reads included); `compute` for pure work; `spawn` for the network (D11). Never
`block_on`, never a lock taken while drawing. Only exception: a pure core function whose input
the screen bounds, under 1 ms, called directly but still through `api/` (D12). Every concurrency
rule is in `docs/architecture/backend.md` → "The concurrency rules"; one that is not there does not exist.
rule is in `docs/architecture/interface/backend.md` → "The concurrency rules"; one that is not there does not exist.
- A data rule (what a `{{field}}`, a variable name, a heading is) belongs to the core: `text`,
`richtext`, `drawing` take its result as an argument and never redefine it (D10).
- Drawing reads a screen's state (`&…State`) and may change its view (`&mut …View`: text being
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/performance-profiling/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ description: Use when a DevNotes operation feels slow (query_notes, search, boar
2. Known facts: one lock serialises commands, and `query_notes` holds it for ~90 % of its cost; lists send previews (`PREVIEW_LINES`); side tables are read by bound ids up to 500, else by subquery; decrypting sealed fields dominates.
3. Fix at the owning layer (the core for data; a `QueryCell` compared by value, one call in flight; virtualise past ~100 rows; cache a costly `LayoutJob`; nothing costly in the frame).
4. Keep `autobenches = false`, `bench = false` and no `Drop` on `Corpus` (load-bearing).
5. Report before/after numbers on the same machine; update the table in `docs/architecture/testing.md` → "Benchmarks" only for durable changes.
5. Report before/after numbers on the same machine; update the table in `docs/architecture/project/testing.md` → "Benchmarks" only for durable changes.
2 changes: 1 addition & 1 deletion .claude/skills/platform-integration/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ description: Use when adding or changing what DevNotes asks of the operating sys
6. **The `e2e` flavour** (`--features e2e`) adds eframe's inspection port, the software adapter and two doors — `--action <name>` and `DEVNOTES_E2E_DIALOG` — and nothing else; it takes no global key. A release build of it does not compile. Never widen it.
7. Test in the module: a temporary directory for anything on disk; a real second process only where the subject is processes (`instance`).

**Verify**: `cargo clippy --workspace --all-targets --all-features -- -D warnings`, `cargo test --workspace --exclude e2e`, then run the app on a temporary profile (`cargo run -p app -- --profile <dir>`) on each OS the change touches, and say which ones did not run. Reference: `docs/architecture/engine.md` → "The binary, its profile and its window".
**Verify**: `cargo clippy --workspace --all-targets --all-features -- -D warnings`, `cargo test --workspace --exclude e2e`, then run the app on a temporary profile (`cargo run -p app -- --profile <dir>`) on each OS the change touches, and say which ones did not run. Reference: `docs/architecture/core/engine.md` → "The binary, its profile and its window".
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:

- *stop-the-run

# The showcase site (docs/architecture/website.md → "The website"): its own project and lockfile. The
# The showcase site (docs/architecture/project/website.md → "The website"): its own project and lockfile. The
# build fetches the latest release and asks GitHub for every download link.
website:
name: Website
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Website

# devnotes.fr: the site built from `website/` and `docs/content/`, pushed as the whole content of
# one commit to the `main` of `vmillet-dev/devnotes-website`, whose webhook deploys it
# (docs/architecture/website.md → "The website"). Two things change what it shows: a push to `main` that
# (docs/architecture/project/website.md → "The website"). Two things change what it shows: a push to `main` that
# touches its sources, and a release, whose files the download page names. The second needs the
# run that follows `Release`: what that workflow pushes with its own token triggers nothing.
on:
Expand Down
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CLAUDE.md

Guidance for Claude Code in this repository. `docs/architecture/` is the detailed reference, a wiki of pages by area whose home (`README.md` there) says what each page holds; a section is named by its heading after an arrow, unique across the pages, and `scripts/architecture-links.mjs` checks every such name: read the relevant section before a structural change and keep it in sync. Not this file, not the README. The decisions taken for the egui application (D1–D33) are its `decisions.md`; a decision is changed there first, never silently in code.
Guidance for Claude Code in this repository. `docs/architecture/` is the detailed reference, a wiki of pages by area whose home (`README.md` there) says what each page holds; a section is named by its heading after an arrow, unique across the pages, and `scripts/architecture-links.mjs` checks every such name: read the relevant section before a structural change and keep it in sync. Not this file, not the README. The decisions taken for the egui application (D1–D36) are its `decisions.md`; a decision is changed there first, never silently in code.

## Project

Expand Down Expand Up @@ -58,7 +58,7 @@ Principles:
- **Tools**: a pure Rust function each, called on the `compute` queue; `result` is an output, never an input; secrets are plain values. → "The tools: one contract…".
- ⚠️ **The identity tool's lists are compiled in**: `crates/engine/resources/identity/` is `include_str!`-ed by `tools/identity/data.rs` (the standalone executable is one file) and each list is held whole by a test, not checked at run time. ⚠️ The names are **one list** (`names.txt`): never sort people's names by origin or by country — not in data, file names, order, code or tests. A new country is a file of places there, named in `data.rs`. → "The identity tool is that design…".
- ⚠️ **Request scripts run in the app relaunched as a script host** (`--script-host`, read in `main` before any window): QuickJS, one host per request, a phase at a time; `pm.sendRequest` is sent by the parent. What `require` finds is bundled by `crates/engine/sandbox/build.mjs` into the committed `sandbox/dist/`. → "Request scripts, in a process of their own".
- **JSON explorer/visualiser**: inputs only; Rust owns the model (`explore_json`, nesting capped at 256, node/row caps). → "Exploring a JSON snippet", "The JSON visualiser's model".
- **JSON explorer/visualiser**: inputs only; Rust owns the model (`json::model::explore`, nesting capped at 256, node/row caps). → "Exploring a JSON snippet", "The JSON visualiser's model".
- `closed_enum!` declares enums once. **Imports degrade rather than fail**, in one transaction; an added variant does not bump `FORMAT_VERSION`. → "Import, export and copying out".
- ⚠️ **Every name of the application is `brand`'s** (D36): six values of the root `Cargo.toml`'s `[workspace.metadata]`; never type the name, the slug, the identifier, the extension or the site. Other metadata is read from `Cargo.toml` at compile time; the changelog is baked in (`include_str!`). → "The application's names".

Expand Down Expand Up @@ -89,7 +89,7 @@ Read at the `angular-reference` tag; the egui mechanism is in `docs/architecture
- No router: areas, list view and board are state; an area keeps its state when not shown. Area keys are read by physical key (AZERTY). → "No router".
- `null` space = "all spaces". Nothing corpus-wide runs before saying what it touches (count from Rust). Sections are exhaustive and local-day based; search debounce 150 ms; "À trier" ends at `endOfLocalDay`; `pinnedFirst` is the user's choice.
- Every library operation reports through the status notifier, even when nothing changed.
- A card is two layers (→ "A card is two layers"). Every drag is a pointer gesture plus a keyboard twin. The board dims, never narrows; gestures commit on release, snapped to `GRID_PX`, saved debounced. Escape falls through modal → overlay → selection → search → up a folder level. The canvas keyboard is one table (`CANVAS_KEYS`); arrangement is the library's (`devnotes.notes.arrangement`). → "The board: the second view of a space", "Descending into a folder".
- A card is two layers (→ "A card is two layers"). Every drag is a pointer gesture plus a keyboard twin. The board dims, never narrows; gestures commit on release, snapped to `GRID_PX`, saved debounced. Escape falls through modal → overlay → selection → search → up a folder level. The canvas keyboard is one table (`notes::canvas::shortcuts::CANVAS`); arrangement is the library's (`devnotes.notes.arrangement`). → "The board: the second view of a space", "Descending into a folder".
- A preference is applied on a button (only theme and density preview before Apply). Global shortcuts are first come, first served, stored under W3C `code` names and recorded as the system hears them (the character typed, the position on macOS). The window starts hidden and is shown when ready; its geometry is remembered without visibility. A silenced update is a version written down (`skippedUpdate`). → "Preferences", "Shortcuts: two vocabularies, two storage paths", "The binary, its profile and its window".
- Theming: `ui::theme::tokens` (copied from the reference's `styles.scss`; text sizes, gaps and radii are its role scales `font`, `gap`, `radius`, each role defined once), read through `theme::palette(ctx)` / `theme::spacing(ctx)`; no colour, gap, radius, text-size or duration literal elsewhere (held by sweep tests). Dark the base, light with its own amber; text ≥ 4.5:1, held by a Rust test. Accessibility: 24×24 targets, destructive controls red at rest, modals stacked by the rungs of `dialog.model.ts`. → "Theming", "Accessibility", "The widget kit".

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ A debug build writes its log on the terminal from `debug` up, a release from `in
the profile's `logs/` keeps warnings and errors, each after the lines that led to it. `DEVNOTES_LOG`
changes the levels for one run, in `flexi_logger`'s syntax
(`DEVNOTES_LOG=engine=trace,ui::backend=debug cargo run -p app -- …`); what a line may say is in
[docs/architecture/logs.md](docs/architecture/logs.md).
[docs/architecture/project/logs.md](docs/architecture/project/logs.md).

Node.js 24 runs the release scripts, which have no dependency; nothing is installed at the root.
The website has its own project in `website/`.
Expand Down Expand Up @@ -128,7 +128,7 @@ a third time, never for one step. A control without an `author_id` gets one thro
| ---------------------------------- | ---------------------------------------------------------------------------- |
| `node --test "scripts/*.test.mjs"` | The release scripts' tests, and the architecture wiki's references and links |
| `node scripts/prettier.mjs` | Copies the Prettier compiled in into `crates/text/prettier` |
| `cargo bench -p engine` | The core's benchmarks (not in CI; see `docs/architecture/testing.md`) |
| `cargo bench -p engine` | The core's benchmarks (not in CI; see `docs/architecture/project/testing.md`) |
| `cargo run -p app --example icons` | Redraws `crates/app/icons/` from `devnotes.svg` |

## The layout
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ opt-level = 3

# Speed first: "s" or 2 make the binary smaller and the core slower (a query over 8000 notes
# +37 % or +7 %), and per-crate levels do not reach Rust code under fat LTO. No unwinding: a
# panic ends the process from its hook (D18). The figures: `docs/architecture/releasing.md`
# panic ends the process from its hook (D18). The figures: `docs/architecture/project/releasing.md`
# → "The release binary".
[profile.release]
lto = true
Expand Down
2 changes: 1 addition & 1 deletion crates/ui/src/app/perf.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! The journeys `docs/architecture/testing.md` keeps the figures of (« The window on the reference
//! The journeys `docs/architecture/project/testing.md` keeps the figures of (« The window on the reference
//! corpora ») through the real application, without a window: a frame here is the pass and its
//! tessellation, CPU only, the AccessKit tree a person without a screen reader never pays included.
//! Nothing runs unless `DEVNOTES_PERF` names a profile written by the `reference_profile` bench; it
Expand Down
Loading