Files
doona/src/features/shared
Zakk b93cbf271c feat(engines): work with dae through its native API (#722)
## Problem / 问题

The README already lists dae as a backend, but doona treated every
backend as honk. Against dae's native API every probe failed with 422
(dae accepts only cold probes,
`component/nativeapi/handlers_probes.go:85-89`), mode switching, rule
templates and new groups were always off because dae keeps the entry
file read-only and the sections in `config.d` modules, group edits wrote
honk's policies and filters that dae rejects, and messages said honk.

## How I fixed it / 解决方法

A dae engine profile (`src/api/engines/dae.ts`) holds what differs, and
the pages ask the engine instead of assuming honk. Probes send cold and
offer the kinds dae declares. Writes go to the module that owns the
section, falling back to `config.d/group.dae` as dae does
(`cmd/config_groups.go:103-115`). The group dialog follows dae's
grammar: its policies, no nested groups or `subtag(keyword: …)`, names
dae can parse and does not rewrite (`must_`), `&&` continuation lines
and latency annotations kept, `fixed`/`select` index within the members.
Node delete is offered only for `config.d/node.dae`, the one file dae's
DELETE edits. Messages name the running backend. honk keeps its
behaviour and wording.

Not fixed here, dae side: rules report `source: null` (so the rules page
stays read-only), groups advertise empty `probe_transports` (so
group-wide tests stay off), and `read_only_reason` values
`entry_source`/`layout_unmanaged` are not in the contract enum. dae
publishes `operation.updated` for every probe job, which fills the
notices; honk publishes the same event, so it is left as it is.

## Verified / 验证

`pnpm check` passes (254 files, 4,470 tests). The full e2e suite ran
once at the last code state but two: 10 failures, all from expected text
(fixed in this commit) and from a notice change that is reverted here;
the rerun was stopped by host memory pressure, so CI's e2e is the final
check. Group text written for dae was parsed with dae's own Go parser
(`config_parser.Parse` + `config.New`). Live against dae `0d85246` on a
test VM: nodes, single and all-node probes (cold, healthy nodes 8–14 ms,
a dead node unavailable), new group written to `group.dae` and reloaded,
global and rule mode written to `routing.dae` and reloaded,
configuration page, DNS, logs and connections. That live run predates
the last two fixes (policy labels, `must_` and index checks), which are
covered by unit tests only. No honk screen changes.

| Nodes after test all | Global mode written | Entry file read-only |
|---|---|---|
|
![](https://gist.githubusercontent.com/Zakkaus/b5ab9489e7d14e04c1c8a5e60b277213/raw/affce034911643e4dc25ef76feb3de98b1c1071d/dae-nodes-probed.png)
|
![](https://gist.githubusercontent.com/Zakkaus/b5ab9489e7d14e04c1c8a5e60b277213/raw/affce034911643e4dc25ef76feb3de98b1c1071d/dae-mode-global.png)
|
![](https://gist.githubusercontent.com/Zakkaus/b5ab9489e7d14e04c1c8a5e60b277213/raw/affce034911643e4dc25ef76feb3de98b1c1071d/dae-config-entry.png)
|

---

- [x] I understand this change and answer for every line
- [x] This branch is based on the current main
- [x] I ran the repository's gates and recorded the results in Verified
- [x] Each commit is one coherent change
- [x] If behaviour changed, I updated the documentation
- [x] If interface text changed, I updated `en.json` and every complete
language's catalogue
- [ ] If interface appearance changed, I attached light and dark
screenshots
- [ ] If the API contract changed, I ran `pnpm gen:api` and `pnpm
check:gen`
- [ ] I checked the boxes above without reading them
- [ ] I am an AI agent, and this content was submitted without human
review
2026-12-05 04:58:16 +11:00
..