Commit Graph
143 Commits
Author SHA1 Message Date
BlackAngelTV c61a13176e chore(changelog): regenerate from the commit history
CI / quality (pull_request) Has been cancelled
2026-09-25 20:29:32 +02:00
BlackAngelTV 44e990d04b docs(agents): update the repository conventions and commit rules
The instructions now speak of a dépôt rather than a repo, point at
CONTRIBUTING.md for the collaboration conventions, require signed commits
and state how a commit asked for by the maintainer must be written.
2026-09-25 20:29:31 +02:00
BlackAngelTV 99e1fd2723 fix(moderation): tell a mute apart from a kick in the logs
A timeout was filed as "Exclusion temporaire" right next to "Expulsion",
so a sanction could not be read back from the log channel, the direct
message or `/mod logs`. Each action now carries its own emoji and wording
behind a single label, used by every surface.
2026-09-25 20:29:19 +02:00
BlackAngelTV 859b229181 Merge pull request 'Feat/add missing commands' (#146) from feat/add-missing-commands into main
CI / quality (push) Has been cancelled
Reviewed-on: #146
2026-09-25 18:13:58 +00:00
BlackAngelTV d720c0a17e chore(changelog): regenerate from the commit history
CI / quality (pull_request) Has been cancelled
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-09-25 20:11:05 +02:00
BlackAngelTV 9f8ac0d29e feat(moderation): add the unmute and unban commands
A sanction could be applied but never lifted from Discord, so undoing a
mistake meant leaving the bot for the server settings. Both lifts are
recorded next to the sanctions they lift, which means widening the
moderation history CHECK constraint through a table rebuild.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-09-25 20:11:00 +02:00
nocode b8be549fda Merge branch 'feat/web-dashboard'
CI / quality (push) Has been cancelled
2026-09-24 20:53:31 +02:00
nocodeandClaude Opus 5 b9bc3b934b chore(changelog): regenerate from the commit history
CI / quality (pull_request) Has been cancelled
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 18:46:36 +02:00
nocodeandClaude Opus 5 566af4db70 docs(web): document my tasks, the search and the status page
Adds the chapter the three tools were missing, and points the monitoring
guide at /api/status rather than /api/health, which answers a narrower
question than an operator usually means.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 18:46:35 +02:00
nocodeandClaude Opus 5 a1e1de7734 feat(web): publish a public status page at /status
Checking whether the service is up required an account, so the answer
lived where the people asking could not reach it.

The page is rendered on the server with no script at all and refreshes
through a meta tag: a status page that needs a working browser is
useless at the moment it is read. Two rules follow from it being public.
A repository the forge does not list as public keeps its environment
visible but loses its name, and the banner always states the worst true
thing — a failed deployment forbids the green headline even while the
bot answers. WEB_PUBLIC_STATUS=false removes page and route together.

/api/status gives the same in JSON, which is what a monitor should watch
rather than /api/health — the latter only says the process is alive.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 18:46:26 +02:00
nocodeandClaude Opus 5 9acb523510 feat(web): search the whole panel from one place
Finding anything meant knowing which tab it lived in — fine once you
have learned the panel, hopeless before. ⌘K now covers cards,
repositories, issues, wiki pages and members at once.

Pages are matched in the browser, so the palette answers before it has
asked the server and stays useful while the forge is down. Each remote
source is queried independently and a source that fails is simply absent
from the results, rather than taking the others with it. Issues come
from one organization-wide request: per repository, the palette could
not afford them on every keystroke.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 18:46:04 +02:00
nocodeandClaude Opus 5 fcc82d82d6 feat(projects): gather the cards one member carries
A board answers "where does the work stand". Nobody opens a dashboard to
ask that first: they ask what is on them today, and once the work is
spread over several boards no single board can answer it.

The cards assigned to a member are now listed on a page of their own,
grouped by deadline, with a counter on the sidebar entry — a page you
have to open to know whether it needs you is a page you stop opening.
The column travels with each card, so finishing one from the list is a
single move rather than a detour through its board.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 18:45:03 +02:00
nocodeandClaude Opus 5 d2256e2211 refactor(web): extract the build marker into its own module
The version and the interface build date were computed inside the route
file, where two copies of the same comment had already drifted apart. The
status page needs the same answer, and a second copy would eventually
give a different one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 18:43:41 +02:00
nocodeandClaude Opus 5 e3ce266225 docs(ops): correct the deployment path for a panel without a shell
Pterodactyl's console is the process stdin, not a terminal, so the previous
instructions could not be followed even with full panel rights. The chapter
now covers both cases: a real shell where one exists, and otherwise the
dashboard's own command deploy, which runs inside the container and needs no
console at all.

It also starts by checking the commands land on the filesystem the bot
reads — a pull in the wrong place reports success and changes nothing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 14:11:51 +02:00
nocodeandClaude Opus 5 1643fcb591 docs(ops): document deployment, CI, monitoring and backups
Four independent procedures, each opening with the failure it prevents —
most of them ones this project actually hit: a front-end older than its API
after a partial upload, a broken card move that no test ran before it
shipped, an evening spent asking whether the site was down, and a database
that came back empty after a rebuild.

The CI workflow ships with them. It leaves out `format:check`, which would
fail on CRLF files that predate the Prettier configuration; normalising them
deserves a commit of its own.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 14:08:52 +02:00
nocodeandClaude Opus 5 1c21f6ff53 feat(projects): pull Gitea issues onto any board
The import only existed on a repository board and always landed in the first
column. The organization board is exactly where issues from several
repositories belong together, so the button now lives on every board and
asks which repository, which column, and whether closed issues come too.

An issue already on the board is skipped rather than duplicated, so the
button survives being pressed twice — which the tests check against a
stand-in forge, along with the due date and labels carried over.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 14:03:06 +02:00
nocodeandClaude Opus 5 8869c74b7b fix(wiki): render the public pages on the server
The documentation was assembled in the browser, so a client that runs no
script saw an empty shell — including whoever fetches the terms and privacy
links before approving an application, which is exactly what those pages are
for.

The wiki is now delivered as finished HTML, carries no script at all, and
declares itself indexable, unlike the panel. Search works through a plain
query string, an unknown page answers 404 rather than a blank page, and both
legal pages are linked from the footer of every page.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:31:27 +02:00
nocodeandClaude Opus 5 3d0e21d7cb feat(wiki): serve the legal pages at /terms-of-service and /privacy-policy
Discord, and most platforms, ask for a terms URL and a privacy URL in a
form field; pasting a `/wiki/...` address there reads like an afterthought.
Both pages now answer at the root, while everything else stays under
`/wiki/`.

The API states each page's address instead of leaving the front to rebuild
it, so there is one place that decides. Existing pages are renamed rather
than recreated, keeping whatever has already been written in them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:25:59 +02:00
nocodeandClaude Opus 5 e1b9a5cc77 feat(projects): add the board interface
Drag and drop between columns, cards carrying an assignee, a due date,
labels and a linked issue whose state shows on the card. An overloaded
column says so in its header rather than blocking the drop.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:09 +02:00
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 c031b4d9e2 fix(web): keep the stack when a view fails
Views caught their errors and showed only the message, so nothing said which
module or which line had failed — neither in the console, which never saw
the error, nor on the page.

The stack is now logged and offered on the page behind a disclosure, because
opening the developer console is not always an option on a self-hosted
panel.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:08 +02:00
nocodeandClaude Opus 5 92c27aed9f fix(web): read the interface build date instead of freezing it at startup
The marker was captured once at import, while the front-end is served from
disk on every request. Uploading new files therefore left it announcing the
old build until the next restart — the exact confusion it was added to
prevent.

It is now read from disk, cached ten seconds so a health check does not walk
the tree each time.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:08 +02:00
nocodeandClaude Opus 5 75d1e53205 fix(web): stop the settings page breaking on an unexpected payload
Every list the page walks was read straight off the response, so a single
missing field took the whole view down with `undefined.map` — which reads as
a broken feature rather than as what it is, a page and an API disagreeing on
the shape of the data.

The page now normalises what it receives: absent lists render empty, an enum
without options falls back to a text field, and settings that arrive without
sections are shown under one heading instead of not at all.

Errors of that family also say so, and point at the reload that fixes them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:07 +02:00
nocodeandClaude Opus 5 95b51ab428 feat(web): open a repository from anywhere on its row
The cards on the repository page already opened as a whole, but the tables
on the organisation and overview pages still only linked the name, so the
same object behaved differently depending on where it was listed.

A table row can now carry a destination. Controls inside it keep their own
behaviour, the row is reachable with the keyboard, and only the empty space
navigates.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:07 +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 3bd290cba6 fix(web): say when the dashboard is disabled
`WEB_ENABLED` not being `true` produced no output at all, so a missing site
looked exactly like a broken one and there was nothing in the console to
tell the two apart.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:07 +02:00
nocodeandClaude Opus 5 afcd0e55bc fix(web): say out loud when the dashboard cannot listen
A failed `listen` only produced a generic line the bot then carried on past,
so the site was simply absent with nothing explaining why — and inside a
container a bind on an unpublished port succeeds while staying unreachable,
which looks identical to a crash from the browser.

The error now names the address, the port and the actual cause, and a
successful bind on `0.0.0.0` reminds that the port still has to be published
by the host.

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 5660235f3d docs(web): document the wiki, the settings and the command publishing
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:06 +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 c76c0b96eb feat(wiki): serve a public documentation written from the panel
Pages live in SQLite and are read without a session: documentation nobody
can reach without an account is not documentation. Drafts answer 404 even
when their address is guessed, and the site never falls back to the
dashboard shell, which would send a visitor to a login screen.

The wiki ships with terms of use and a privacy policy written against the
revised Swiss LPD, describing table by table what this codebase actually
stores. Both are marked protected: they can be rewritten, not deleted, and
a deleted one comes back on the next start — a bot that processes personal
data must always be able to show its notice.

The bracketed details still have to be completed and the whole reviewed;
this is a starting point written from the schema, not legal advice.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:06 +02:00
nocodeandClaude Opus 5 621f3e404b style(web): adopt the official FWS mark and its palette
The placeholder mark was an Arch-blue chevron. The site now carries the FWS
logo — cyan ring on dark navy — and its accent colour follows, so the
dashboard and the brand no longer disagree.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:06 +02:00
nocodeandClaude Opus 5 e397abcfcd fix(web): make the whole repository card open the repository
Only the name was a link, so most of a rectangle that reacts to the pointer
led nowhere.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:06 +02:00
nocodeandClaude Opus 5 262274473a feat(web): publish the slash commands from the panel
Registering the commands was the one routine step that still needed shell
access on the host, which is awkward when the bot runs behind a hosting
panel. Guild commands take effect immediately, so the button says what it
did as soon as it returns.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:05 +02:00
nocodeandClaude Opus 5 b42fb1065a feat(voice): take back the generated channels the database forgot
A voice channel outlives the process that made it. A restored backup, a
wiped `data/` folder or a redeployment shipping a fresh database all leave
real channels behind that nothing manages any more: they are never cleaned
up, and their owner can no longer rename or lock them.

At startup the bot now reclaims the channels sitting in a trigger's own
category and named after its template — a channel created by hand is never
touched. Those still in use go back to whoever is inside; the empty ones are
leftovers and are removed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 23:20:05 +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 d439b1b3e8 feat(web): make deploying reachable from where it is looked for
The « Déployer » button only existed on the row of an already created
target, so an empty list was a dead end whose only way out sat in the page
header. The empty state now carries the action that fills it.

A release also gains its own deploy button: wanting to ship a given version
is the moment people look for it, and sending them to another page to retype
the tag was needless.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 20:47:47 +02:00
nocodeandClaude Opus 5 a44ff0cb52 fix(web): pin the sidebar highlight to the route, and name the build
The highlight compared hrefs, which a trailing slash or a query string in the
hash was enough to defeat, and it only ran once the view had loaded. Each
link now carries the route it stands for and the highlight is applied as soon
as the sidebar exists.

The footer also states the running version and the date of the newest
interface file. Deployments that ship an archive make it easy to look at a
stale copy and wonder why a fix is missing; the page can now say so.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 20:47:46 +02:00
nocodeandClaude Opus 5 2083133c7a docs(web): document the live updates
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 20:39:59 +02:00
nocodeandClaude Opus 5 5481e79dc4 feat(web): refresh the pages as the events arrive
One `EventSource` for the whole dashboard, held in a single slot: a view that
re-renders itself would otherwise register a second listener each time and
double the work on every event.

A refresh landing under someone's fingers is worse than data a few seconds
old, so it waits while a dialog is open or a field has focus, a burst of
writes collapses into one reload, and a background tab closes its stream.
The Discord page stays off the tick because listing members calls the
Discord API. When the stream cannot be established a timer takes over.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 20:39:59 +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 9c6297e00e fix(web): always offer the bootstrap token on the sign-in page
The field only appeared when a token was already configured, which hid the
one way back into the configuration exactly when Discord sign-in is broken
or not set up yet. It is now always present, and says how to obtain a token
when none is available.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 20:34:16 +02:00
nocodeandClaude Opus 5 ff15dfe92f fix(web): let a deploy target be created without a reachable Gitea
The « Nouvelle cible » button was hidden whenever the repository list came
back empty, and a Gitea answering 403 took the whole page down with it — so
a forge problem removed every way to set up a deployment, including webhook
and shell targets that never talk to Gitea at all.

The list is now a convenience: its failure is reported as a warning and the
repository falls back to a free-text field.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 20:34:16 +02:00
nocodeandClaude Opus 5 a0428e0549 fix(web): keep the sidebar in step with the page being shown
Navigating only swapped the main area, so the highlighted entry stayed on
whichever page the shell was built with and nothing on screen said where you
were. The highlight is now refreshed on every navigation, carries
`aria-current` for screen readers and an inset marker that reads at a glance,
and the browser tab takes the page name.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 20:34:09 +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 e63d6aa18e docs(web): document the dashboard and the configuration wizard
Both READMEs gain the same section and the same variables, as the
organisation requires them to stay in sync.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 20:09:14 +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
nocodeandClaude Opus 5 06a9be0cba feat(web): serve the dashboard and its interface
The front-end is plain JavaScript served as is: no build step to run before
the bot starts, and no second toolchain to keep alive. A simple/advanced
switch hides the technical panels without ever standing in for a permission.

`npm run setup` starts the wizard alone, because the bot refuses to boot
without a token and the `.env` has to be writable from somewhere. When the
webhook and the dashboard share a port, a single HTTP server is started.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 20:09:14 +02:00