Commit Graph
24 Commits
Author SHA1 Message Date
nocodeandClaude Opus 5 901ca56959 feat(projects): add a Kanban board per repository and one for the organization
Boards live in SQLite rather than in Gitea, whose project API is not stable
across versions: a board that stops working whenever the forge hiccups is
worse than no board, and this one has hiccupped already.

A card can still point at an issue — `owner/repo#12` — and its real state is
resolved when the forge answers, one request per repository rather than per
card. Open issues can also be imported in bulk, skipping those already on
the board.

Columns follow the ones the README describes, and carry an optional card
limit which warns rather than refuses: stopping someone mid-gesture to
enforce a convention is not what a limit is for.

Moving a card rebuilds the order explicitly — take the column without it,
insert at the wanted rank, renumber — because fractional positions get the
same-column case wrong, as the tests showed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:08 +02:00
nocodeandClaude Opus 5 b793298cbf test(web): lock the sidebar highlighting behind tests
It has been reported twice and fixed twice by reading the code, which is how
it came back. The decision is now a module of its own — the shell only asks
it which entry is current — and twelve cases pin it down: a detail page, a
query string, every spelling of the home route, and the original regression
where home stayed lit everywhere.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:08 +02:00
nocodeandClaude Opus 5 3f4a5709cf fix(web): stop caching the interface modules
Modules cache independently, so a browser could revalidate one and keep an
older copy of another — leaving a page running one version of itself and a
different version of its helpers. That surfaces as an error inside a
feature, which is nothing like what it is, and no reload short of clearing
the site data reliably fixes it.

A dashboard is a handful of small files read by one person at a time: the
bandwidth caching saves is worth less than the failure it causes. They are
now fetched fresh.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:08 +02:00
nocodeandClaude Opus 5 539b1506f4 fix(web): give static assets a validator caches can check
The front-end was served with `no-cache` but no `ETag` and no
`Last-Modified`, so a cache had nothing to revalidate against and could keep
handing out modules older than the API they talk to — which surfaces as a
cryptic error in a view rather than as anything resembling a stale cache.

Assets now carry both, and an unchanged file answers 304.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:07 +02:00
nocodeandClaude Opus 5 40032ec091 fix(config): warn when a public address is announced but only loopback is bound
`WEB_HOST=127.0.0.1` is the right default behind a reverse proxy on the same
machine, and the wrong one inside a container or on a hosting panel, where
the process has to bind the allocation. The guidance only mentioned the
first case, so a `.env` written from the wizard could leave the dashboard
listening where nothing could reach it — every request timing out with
nothing saying why.

The wizard now flags the contradiction between a loopback bind and a public
URL, and both the help text and `.env.example` name the container case.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:07 +02:00
nocodeandClaude Opus 5 e5b7303a01 feat(wiki): add the reading site and its editor
The renderer escapes HTML before any transformation and drops
`javascript:` links. Pages are written by the team, but a renderer that
relies on that is one mistake away from being a hole.

The editor previews as you type: legal pages are long, and writing Markdown
blind is how broken tables end up published.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:06 +02:00
nocodeandClaude Opus 5 406b5af3ea feat(settings): make the server settings real, and widen them
The dashboard offered seven switches that nothing read: they promised a
behaviour the bot did not have, which is worse than offering nothing.

Every setting is now declared once, with its type, its bounds and its
explanation, and the services read it: the welcome message and its wording,
the automatic role, departure notices, the private notice sent to a
sanctioned member, the default mute duration, how much history a ban erases,
whether a closed ticket is deleted or archived, and an optional role mention
on the Gitea notifications.

A test walks the sources and fails when a declared key is read nowhere, so
the list cannot drift back into decoration.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:05 +02:00
nocodeandClaude Opus 5 df89cc5893 feat(web): push live updates to the dashboard
Reading a page and wondering whether it is still true is a poor way to watch
a deployment, and polling every page on a timer costs far more than it
returns.

The server keeps one `text/event-stream` per open tab and publishes on it:
a write once it has actually succeeded, tagged with the page it concerns, a
deployment when it starts and when it ends, an incoming Gitea webhook, plus
a tick and a heartbeat that stops proxies closing an idle stream.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 20:39:59 +02:00
nocodeandClaude Opus 5 20ff701430 fix(web): derive the OAuth2 redirect from the address actually used
`WEB_PUBLIC_URL` was the only source of the `redirect_uri`, so a hosting
panel or a proxy publishing the dashboard on another port produced a link
Discord refuses, with nothing on screen pointing at the port mismatch.

The browser's own origin is what Discord compares against, so the redirect
now comes from the request, honouring `X-Forwarded-Host` and
`X-Forwarded-Proto` when a proxy sits in front. `WEB_PUBLIC_URL` stays as
the fallback for links built outside a request, and the sign-in page prints
the exact value to declare in the portal.

The `Secure` cookie flag follows the same rule: announcing HTTPS in the
configuration while serving plain HTTP made the browser drop the session.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 20:12:44 +02:00
nocodeandClaude Opus 5 bd7fdea275 test(web): cover the router, configuration, auth, deployments and server
The schema test compares the declared variables against `.env.example`, so
the two cannot drift apart. The server tests drive the real handler over a
loopback socket rather than a mock, which is what caught the health probe
missing from bootstrap mode and the deployments recorded under the wrong
guild.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 20:09:14 +02:00
BlackAngelTV 50665c8edd refactor(all): uniformisation 2026-09-23 18:25:28 +02:00
BlackAngelTV 9bbe9cb0b4 docs(readme): translate the documentation and document the contribution workflow
The organisation asks every repository for both languages, for the issue and
pull request templates, and for the commit, branch and release rules; the
README now states them, README.en.md mirrors it, and a test keeps the two in
sync so a change on one side cannot be forgotten on the other.

The readme also documents what shipped since it was last written: several voice
triggers, the guaranteed cleanup of empty channels, the editable bot statuses,
the message tone and the variables they add.
2026-09-15 16:15:00 +02:00
BlackAngelTV c785e9abb7 feat(status): rotate an editable list of bot statuses
The presence line was hard-coded, so advertising a different message meant
editing the source and restarting the bot. Statuses now live in the database
and are managed from Discord with /status — add, list, remove, pause and the
rotation interval, which applies without a restart.

An empty list falls back to a neutral "see the commands with /help" line, and
the first status added shows up right away instead of waiting a full turn.
2026-09-15 16:12:50 +02:00
BlackAngelTV ef8f09da10 refactor(ui): give every message one friendly, ungendered voice
Members read all replies as one voice, so the wording now lives in one place:
the shared titles, the list marker and the "what to do next" hint come from
src/ui/embeds.js, and every module follows them.

An error explains the cause, recalls the rule and offers the way out instead of
blaming; a success says what happens next. Nothing agrees on the gender of a
person ("utilisateur", "cher/chère", "ravie"), which also keeps the sentences
shorter. Two tests lock the shared titles and reject gendered descriptions.
2026-09-15 16:12:19 +02:00
BlackAngelTV 76e2269555 feat(voice): guarantee an empty generated channel disappears
A generated channel could survive with nobody in it: the row was dropped before
the channel was really gone, so a refused delete call left a room nothing could
track anymore, and an event missed while the bot was down was never retried.

The row is now kept until Discord confirms the channel is gone, and a sweep at
startup then every minute deletes whatever the event missed. The grace period
is tunable with VOICE_EMPTY_GRACE_MS, 0 deleting as soon as the room empties.
2026-09-15 16:11:30 +02:00
BlackAngelTV 836abeafd5 feat(voice): support several trigger channels with their own category
A server needs one "create your own room" channel per theme, which a single
trigger id could not express. Triggers are now stored as a list, each with its
own home category, name template and default limit.

Joining a trigger creates the channel at the bottom of that trigger's category,
and a member keeps one channel per trigger instead of one room for the whole
server. Triggers declared by the single-trigger version and
CHANNEL_VOICE_TRIGGER_ID still work as fallbacks, so no server has to be
reconfigured.
2026-09-15 16:09:39 +02:00
BlackAngelTV aa5343b4b2 test(app): add command and event loading smoke tests
Loading every module catches broken imports and invalid slash command definitions, which unit tests on the services cannot see.
2026-09-15 14:51:18 +02:00
BlackAngelTV 5191942d5a feat(voice): add temporary voice channel manager
Joining the trigger channel must feel instant and never leave orphan channels behind, so the ownership is stored in SQLite, empty channels are deleted after a short grace period and a startup sweep cleans up whatever a restart left behind.
2026-09-15 14:51:17 +02:00
BlackAngelTV ef1bedbc65 feat(polls): implement polls, fun and statistics commands
A poll must end even when nobody is there to close it, so a scheduler reads the stored end dates and finalises the results at startup and while running.
2026-09-15 14:50:54 +02:00
BlackAngelTV a5280ce205 feat(notifications): dispatch Gitea webhooks through the notification service
A guild can reroute a notification type to its own channel from SQLite, with the environment values as fallback, without editing the configuration or restarting the bot.
2026-09-15 14:50:41 +02:00
BlackAngelTV 76d0bf9250 feat(gitea): add embeds, modals and the issue and pull request commands
Creating an issue or a pull request needs a title and a description, which do not fit in a slash command option, so the branches chosen as options are kept in memory for a few minutes until the modal is submitted.
2026-09-15 14:50:40 +02:00
BlackAngelTV 03a217c775 feat(database): add repositories for tickets, moderation, polls and notifications
Keep every SQL statement out of the command layer so each feature can be built and tested without a Discord dependency.
2026-09-15 14:50:34 +02:00
nocode baef3fa0af test(database): add sqlite storage tests
Refs: #16
2026-09-13 12:25:11 +02:00
nocode 52e24bd4af test(auth): add permission checks tests
Refs: #115
2026-09-13 12:25:11 +02:00