Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / ucode static checks (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Blocked by required conditions
- The personal page loads faster and costs the router less: its script and styles come compressed, stay in the browser until the next update, and the icon comes with the page instead of a request of its own - The page uses the system's own font (SF Pro on Apple devices, Segoe UI on Windows, Roboto on Android) instead of downloading one - The top of the page shows the server's name alone, so it fits on a phone - Text can be selected only where it is there to be copied (addresses, file names, the configuration), with the name field's own selection: a soft highlight with handles that glides after the pointer - Sheets scroll without a scrollbar - Red buttons (Remove) light up under the pointer, as the others do - Demo: "Demo" and GitHub are one button; on a phone it floats at the bottom of the screen, and switching scenarios no longer makes the edge fades jump
5.2 KiB
5.2 KiB
AGENTS.md — Dawnline
Guidance for coding agents working in this repository (tickcount/luci-app-dawnline): an AmneziaWG access server for OpenWrt with a LuCI admin UI and a personal portal. CLAUDE.md points here.
Rules
rules/code-standards.md— how all code is written: decomposition, one locked writer, fail closed, validation at the boundary, comments and commits.rules/backend.md— ucode on the router: module layers, conventions, what things cost there (CGI portal, rpcd, the agent's watcher).rules/frontend.md— TypeScript admin UI and portal: layout ofweb/src, pollers and the live revision.rules/shell.md— install, uninstall, init and CI scripts.rules/ui-design.md— how the admin UI and the portal look: modern product quality, mock first from the real CSS and components, verified in the browser.DESIGN.md— the personal portal's design system: tokens, components, layout and motion, measured on the live page. Read it before any work on the portal (web/src/portal, and what it uses fromweb/src/shared); a change to how the portal looks or moves updates it in the same change.rules/i18n.md— translations: every visible string and backend message wrapped, the catalogs, the Russian style guide and glossary. Anything added to the admin UI or the portal is localized in the same change; anything removed takes its catalog entries with it.
This repo usually sits inside the router-admin workspace (../AGENTS.md). Its rules apply to anything that touches the router: read-only first, backup before mutating, router shell as a literal stdin heredoc over SSH (../rules/).
Layout
package/luci-app-dawnline/root/— what lands on the router: ucode modules inusr/share/ucode/dawnline/(rpc/for the LuCI backend), the agent and updater inusr/libexec/dawnline/, the portal inusr/share/dawnline/portal/, the init script, rpcd ACL.web/— TypeScript sources of the admin UI (src/admin) and the portal (src/portal), shared code insrc/shared;npm run buildwrites the bundles underpackage/(git-ignored: CI builds them before packaging).web/i18n/— the string catalogs' tools (extract.ts,po.ts,lmo.ts).package/luci-app-dawnline/po/— the admin's catalog (templates/dawnline.pot,ru/dawnline.po): luci.mk builds theluci-i18n-dawnline-rupackage from it. The portal's catalog isweb/src/portal/i18n/ru.po, bundled into the portal.install.sh,uninstall.sh— the standalone installer and uninstaller (both have--dry-run).scripts/—lint-ucode.py,compile-ucode.sh(compiles every ucode file of a tree wherever ucode runs),check-ucode.sh(the same on the router, without installing),ucode-container.sh(compile and unit tests in the OpenWrt rootfs containers CI uses),deploy.sh(dev deploy over SSH),build-packages.sh,build-release.sh,release-notes.sh.tests/ucode/— unit tests of the ucode modules (run.ucruns every*.test.uc; fixtures for/etc/configand a stand-inawg), run in a container byrun.sh.
Checks before a commit or deploy
python3 scripts/lint-ucode.py(use before definition, exports, POSIX regexes, rpcd methods; layering notes are informational).scripts/ucode-container.sh(needs docker): compiles every ucode file and runstests/ucodeon OpenWrt 24.10 and 25.12, exactly what CI does.scripts/check-ucode.shcompiles on the router instead when there is no docker. New ucode entry points are added to the compile list inscripts/compile-ucode.sh, tolint-ucode.py, and to the executables list in.github/workflows/ci.yml; a pure function gets a case intests/ucode/<module>.test.uc.- In
web/:npm run format:check,npm run typecheck(sources and tests),npm run lint(oxlint),npm run knip(unused exports and dependencies),npm run i18n:check(after changing visible text:npm run i18n, translate the new entries in eachru.po),npm test,npm run build— and commit the catalogs (the bundles stay out of git; CI fails when the build leaves a file underpackage/that.gitignoredoes not cover). shellcheck -S warningfor the shell scripts (CI finds them by shebang).- A tag builds only after CI passes on it (
build.ymlcallsci.yml).
Releases
- A release is one commit on
maintitledDawnline X.Y.Z; its body is-points, which become the GitHub release notes and the Components "What's new". Work from a branch is squashed into that one commit. - Bump the version in
package/luci-app-dawnline/Makefile(PKG_VERSION),util.uc(VERSION),web/package.jsonandweb/package-lock.json(CI checks they agree). - No
Co-Authored-Byor other agent attribution in commits. - Push
main, then an annotated tagvX.Y.Z("Dawnline X.Y.Z"); the "Build packages" workflow publishes the.ipk,.apk(the app andluci-i18n-dawnline-ru) andsha256sums.txt. - Re-cutting a release (fixes before anyone installs) rewrites
main: force-push,gh release delete vX.Y.Z --cleanup-tag, cancel a running build of the old tag, tag again. Only with the user's go-ahead. - On the router, install a release the way Components does:
/usr/libexec/dawnline/updater install app@vX.Y.Z(verified against the release's sha256).