mirror of
https://github.com/FeloDeck/Feishin-Plugin.git
synced 2026-11-01 17:33:29 +01:00
4.4 KiB
4.4 KiB
CLAUDE.md
Style
- Keep everything short: replies, explanations, comments, docs.
- Use simple English: short sentences, common words.
- Avoid em dashes (—). Do not just swap them for "-" either. Rewrite the sentence instead, for example with a comma, a colon, brackets or two sentences.
Commits
- English only.
- Conventional Commits prefix:
feat:,fix:,chore:,docs:,refactor:,ci:,build:,test:. - Subject as short as possible. Imperative, lowercase, no trailing period.
- Body only when something genuinely cannot be inferred from the diff.
- Never add
Co-Authored-By, "Generated with" or any other AI attribution to commits or PR descriptions. - Do not commit or push before I have checked the changes locally and said they are fine. Then commit and push. Several attempts at the same thing make one commit, and attempts that did not work make none. Different things done in one session get a commit each. This also goes for releases and tags.
Project
- A plugin for Feishin in two versions, with the same plugin
ID, actions, pictures, settings page and texts:
- TypeScript with Elgato's Stream Deck SDK (
src/), for the Stream Deck app (Windows, macOS). - Rust (
opendeck/), for OpenDeck on Linux, without Node.js. It talks to OpenDeck through theopenactioncrate and runs on one thread (tokioLocalSet). Never hold aRefCellborrow across an.await.
- TypeScript with Elgato's Stream Deck SDK (
- Plugin ID is
de.felitendo.feishin(folderde.felitendo.feishin.sdPlugin). Do not change it: the Stream Deck app and OpenDeck keep profiles and settings by it. de.felitendo.feishin.sdPluginholds what both versions share: pictures, layouts, the settings page (ui/), the texts (en.json,de.json) and the manifest.cargo xtask buildputs the plugin folder for OpenDeck together inopendeck/build/, with a manifest for Linux.- Change both versions together, so they work and look the same.
cargo testcompares the pictures with the ones of the TypeScript version (opendeck/test/*.txt, written bynode opendeck/test/pictures.mts). Settings come from the settings page as loose JSON: Rust reads them into typed structs withsrc/settings.rs(like JavaScript would: truthy,Number(),String()). - TypeScript:
npm run buildbuildsde.felitendo.feishin.sdPlugin/bin/plugin.js,npm run typecheckchecks the types,npm run packmakesdist/de.felitendo.feishin.streamDeckPlugin. - Rust, in
opendeck/:make checkruns the tests,make installbuilds for this PC and installs it into OpenDeck.make packagemakesdist/de.felitendo.feishin.streamDeckPluginfor x86_64 and aarch64 with an old glibc (2.28). It needs zig,cargo-zigbuildand the Rust library for aarch64 (Arch:rust-aarch64-gnu).cargo xtasklists the dev tools. - Test in the real apps. On a real Stream Deck (
lsusb | grep -i 0fd9), only test in a new profile of its own and select the old profile again when done. Else use the virtual deck of OBS Tools (make install-virtual-deckthere): stop OpenDeck, runcargo xtask profile test/e2e/layout.json, start OpenDeck and runcargo xtask e2e. The test brings its own fake Feishin on port 4333, so quit Feishin first. WithSHOTS_DIRset, it saves what the deck shows, to compare both versions.cargo xtask fake-feishinruns the fake alone, to try the keys by hand. - Keys and settings pages look like the other FeloDeck plugins, OBS Tools and the Voicenux plugin.
Releases
- Read
git log <last tag>..HEADand pick the version: only fixes → patch, something new → minor, something that breaks or needs the user to act → major. - Set
Versioninde.felitendo.feishin.sdPlugin/manifest.json(2.1.0.0for v2.1.0), in one commit (chore: release v2.1.0). - Push, then push the tag:
git tag v2.1.0 && git push origin main v2.1.0. - In
opendeck/,make package. Thengh release create v2.1.0with notes like the earlier releases (What's new, Install, Full Changelog link) and only this file (the OpenDeck version), namedFeishin-v2.1.0.streamDeckPlugin. Never attach a second file (the Stream Deck app version, a.zip): the plugin store of OpenDeck then asks which file to download. npm run packmakes the Stream Deck app version. It only goes to the Elgato Marketplace, and I upload it there myself.
Write release notes for users: what they notice, not how the code does it.