Commit Graph
21 Commits
Author SHA1 Message Date
Esiah dc3d0026a4 fix(files): allow uploading to root when another user has same name
PR — Ouverture automatique / create-pr (push) Successful in 4s
Root is a personal namespace per user, so duplicate checks must scope to the
current owner when uploading at root level. Subfolders keep their existing
uniqueness rules.

Also fixed folder creation at root with the same owner scope.
2026-10-22 12:38:40 +02:00
Esiah 6fed804a02 feat(chat,files): edit messages, pin several of them, drag-and-drop upload
Chat messages can now be rewritten by their author only, at any time, with a
"(edited)" marker whose tooltip carries the full date and time down to the
second. The edit is enforced by the SQL filter on user_id, so a message of
someone else answers 404, exactly like a message that does not exist.

Several messages can be pinned at once in the same chat room. Pinning is open
to every member of the room: it is a reading convenience, not a way to take
over someone else's content. A dedicated GET on /chat/pins is required because
the id cursor only reports recent messages, and pinning an old one would
otherwise stay invisible.

The message list is synchronised with two cursors: the id one for new
messages, a timestamp one for rewrites. The server computes that timestamp
before running the query and returns it as-is, in the very frame used by
edited_at, so the client never converts it and cannot drift by a timezone
offset.

Files can now be dropped on the current folder or on any sub-folder card. The
drop zone only reacts to file drags, and the pointer moving from a child
element to another no longer makes the overlay flicker.

A deleted message leaves the pinned list, and its physical file is removed
from the disk as before.
2026-10-22 10:11:39 +02:00
Gitea ActionsandEsiah cbe33bf563 fix(api): disable caching for cloud API responses (#14)
CD — Deployment / deploy (push) Successful in 17s
Browsers applied heuristic caching to JSON API responses because no
Cache-Control header was set, serving stale file lists after delete or
upload even with a hard refresh. Force no-store on all /api/cloud/*
responses.

---------

Co-authored-by: xEsiah <[email protected]>
Reviewed-on: #14
Reviewed-by: Esiah <[email protected]>
Co-authored-by: Gitea Actions <-[email protected]>
2026-10-20 12:09:07 +00:00
Gitea ActionsandEsiah bdf2daa5f3 fix(trash): delete on-disk thumbnails when purging files (#13)
CD — Deployment / deploy (push) Successful in 18s
PR automatique de fix/trash-purge-thumbnails vers main.

---------

Co-authored-by: xEsiah <[email protected]>
Reviewed-on: #13
Reviewed-by: Esiah <[email protected]>
Co-authored-by: Gitea Actions <-[email protected]>
2026-10-19 13:57:16 +00:00
Esiah b526cade6d Merge pull request 'ci(deploy): allow git pull in deploy dir owned by another user' (#12) from fix/deploy-safe-directory into main
CD — Deployment / deploy (push) Successful in 30s
Reviewed-on: #12
Reviewed-by: Esiah <[email protected]>
2026-10-19 12:41:06 +00:00
Esiah 48c416e50b ci(deploy): allow git pull in deploy dir owned by another user
PR — Ouverture automatique / create-pr (push) Successful in 2s
2026-10-19 14:37:55 +02:00
Gitea ActionsandEsiah 599784eec7 ci(pr): pipe PR payload to curl instead of writing /tmp/pr.json (#11)
CD — Deployment / deploy (push) Failing after 0s
PR automatique de fix/folder-traversal-user-rehome vers main.

---------

Co-authored-by: xEsiah <[email protected]>
Reviewed-on: #11
Reviewed-by: Esiah <[email protected]>
Co-authored-by: Gitea Actions <-[email protected]>
2026-10-19 11:26:21 +00:00
Gitea ActionsandEsiah f9ff6ee02c fix(chat): default the read cursor to 0 when counting unread (#10)
CD — Deployment / deploy (push) Successful in 17s
The unread count compared message ids against COALESCE over a scalar
subquery with no fallback. When a user had never opened a discussion
there was no chat_reads row, so the subquery returned NULL and
`m.id > NULL` was never true: the folder never got a badge even though
messages from others were unread.

Give COALESCE an explicit 0 default so discussions that were never
opened count all of the others' messages as unread.

---------

Co-authored-by: xEsiah <[email protected]>
Reviewed-on: #10
Reviewed-by: Esiah <[email protected]>
Co-authored-by: Gitea Actions <-[email protected]>
2026-10-17 13:00:48 +00:00
Gitea ActionsandEsiah 4d725d9a3b ci(deploy): back up before migrating and run migrations explicitly (#9)
CD — Deployment / deploy (push) Successful in 23s
- dump the database to ./backups before applying migrations
- run the one-shot migrate service on every deploy instead of relying only on
  the api depends_on, so a migration is never skipped
- translate the workflow comments to English

---------

Co-authored-by: xEsiah <[email protected]>
Reviewed-on: #9
Reviewed-by: Esiah <[email protected]>
Co-authored-by: Gitea Actions <-[email protected]>
2026-10-17 12:34:56 +00:00
Gitea ActionsandEsiah bcbb5030ec feat(chat,files): salon par dossier, favoris, cloisonnement des droits admin (#8)
CD — Déploiement / deploy (push) Successful in 19s
- chat: salon attache a un dossier, membres = comptes ayant acces au dossier
- securite: suppression du passage automatique admin sur fichiers/dossiers/
  corbeille/recherche/galerie/chat ; l'admin n'accede qu'a ses partages
- favoris: tri en tete dans l'explorateur + page dediee (GET /favorites)
- ui: retrait des pastilles Systeme/Public sur la carte dossier
- migration 007_chat : table chat_messages

---------

Co-authored-by: xEsiah <[email protected]>
Reviewed-on: #8
Reviewed-by: Esiah <[email protected]>
Co-authored-by: Gitea Actions <-[email protected]>
2026-10-16 18:51:27 +00:00
Gitea ActionsandEsiah d49435bbd6 feat(ui): visionneuse et vignettes, retrait du popup identifiants, en-tete fige (#7)
CD — Déploiement / deploy (push) Successful in 20s
- MediaViewer (image/video/audio/pdf/texte) et MediaThumb (vignette video 1re frame, icones audio/archive)
- Gallery/Browser cables sur le viewer et les vignettes ; lib/media.ts + previewUrl
- Admin: bandeau de succes au lieu du popup "Identifiants generes"
- AppShell/PageHeader: hauteur fixe du viewport + en-tete de page sticky (filtres, recherche, stats figes)

---------

Co-authored-by: xEsiah <[email protected]>
Reviewed-on: #7
Reviewed-by: Esiah <[email protected]>
Co-authored-by: Gitea Actions <-[email protected]>
2026-10-16 13:13:25 +00:00
Gitea ActionsandEsiah c5df5c05f1 feat(header): afficher la photo de profil a la place des initiales (#6)
CD — Déploiement / deploy (push) Successful in 20s
/auth/me renvoie desormais has_avatar et avatar_updated_at (LEFT JOIN
user_avatars). Le header affiche l'avatar avec un cache-buster sur
updated_at, et retombe sur les initiales en cas d'absence ou d'echec.

Le profil rafraichit la session apres ajout/retrait de l'avatar pour que
le header se mette a jour immediatement.

---------

Co-authored-by: xEsiah <[email protected]>
Reviewed-on: #6
Reviewed-by: Esiah <[email protected]>
Co-authored-by: Gitea Actions <-[email protected]>
2026-10-16 11:44:34 +00:00
Gitea ActionsandEsiah 284646562b fix(docker): chemin de la CLI de migration apres aplatissement (#5)
CD — Déploiement / deploy (push) Successful in 18s
Le refactor a range cli.ts dans src/lib, donc tsc produisait
dist/lib/cli.js alors que Compose, le bin du package et la doc lancent
dist/cli.js : MODULE_NOT_FOUND, le service migrate sortait en 1 et l'API
(depends_on migrate) ne demarrait plus.

cli.ts revient a src/cli.ts, aux cotes de index.ts et admin.ts :
dist/cli.js est de nouveau produit. Imports ajustes en ./lib/...

---------

Co-authored-by: xEsiah <[email protected]>
Reviewed-on: #5
Reviewed-by: Esiah <[email protected]>
Co-authored-by: Gitea Actions <-[email protected]>
2026-10-16 11:21:54 +00:00
Gitea ActionsandEsiah 9dd1ad72e0 feat: logo et favicon, confirmation modale, fil d'ariane, e-mails sombres (#4)
CD — Déploiement / deploy (push) Failing after 25s
- logo embarque dans les e-mails (CID) et gabarit repense en mode sombre
- favicon multi-tailles + icone PNG, logo a gauche du titre (app et auth)
- modale de confirmation animee a la place de window.confirm
- bouton retour et fil d'ariane dans l'explorateur

---------

Co-authored-by: xEsiah <[email protected]>
Reviewed-on: #4
Reviewed-by: Esiah <[email protected]>
Co-authored-by: Gitea Actions <-[email protected]>
2026-10-16 11:08:47 +00:00
Esiah 25b6e0669a Merge pull request 'fix(nginx): join shared-network and read real client IP via CF-Connecting-IP' (#3) from chore/cloudflare-shared-network into main
CD — Déploiement / deploy (push) Successful in 11s
Reviewed-on: #3
Reviewed-by: Esiah <[email protected]>
2026-10-16 09:24:49 +00:00
Esiah 23df7dd7c6 fix(nginx): join shared-network and read real client IP via CF-Connecting-IP
PR — Ouverture automatique / create-pr (push) Successful in 2s
- nginx rejoint le reseau externe shared-network pour que le tunnel
  Cloudflare le resolue par son nom (cohaise-cloud-nginx).
- real_ip_header CF-Connecting-IP :  devient l'IP reelle du
  client, sinon limit_req et l'audit comptent l'IP du tunnel.
- X-Forwarded-Proto reprend le schema vu par Cloudflare (https) au lieu de
  $scheme (http) : le cookie de session repasse en Secure.
- docs/deployment.md : tunnel Docker via shared-network, deploy.yml sans make check.
2026-10-16 11:18:18 +02:00
Esiah 72a491f8ed Merge pull request 'chore: host bind mounts for data and leaner deploy job' (#2) from chore/deploy-hardening into main
CD — Déploiement / deploy (push) Failing after 1m5s
Reviewed-on: #2
Reviewed-by: Esiah <[email protected]>
2026-10-16 08:55:43 +00:00
Esiah 4c2b58df00 chore: host bind mounts for data and leaner deploy job
PR — Ouverture automatique / create-pr (push) Successful in 2s
Store MariaDB and media data on the host disk via CLOUD_DB_DIR and CLOUD_MEDIA_DIR (default ../db, ../media) instead of Docker named volumes, so they live on the big disk and survive 'down -v'. Drop the host 'make check' from the deploy job: the image builds already run tsc for every workspace, so no Node toolchain is needed on the runner.
2026-10-16 10:53:44 +02:00
Esiah a22f18d860 chore: store database and media on host bind mounts
CD — Déploiement / deploy (push) Failing after 1s
Move MariaDB and media data out of /var/lib/docker onto the host disk via CLOUD_DB_DIR and CLOUD_MEDIA_DIR (default ../db, ../media). Only the frontend build output remains a named volume.
2026-10-16 10:47:12 +02:00
Esiah 37e0b542ae ci: allow manual PR run and skip main as base
PR — Ouverture automatique / create-pr (push) Successful in 3s
CD — Déploiement / deploy (push) Failing after 1s
2026-10-14 15:48:08 +02:00
Esiah cc397e96d8 chore: initial import of CoHaiSe Cloud
PR — Ouverture automatique / create-pr (push) Failing after 1s
Standalone files & media application: React/Vite frontend with the @cohaise/ui design system, Hono + MariaDB backend, nginx reverse proxy, Docker Compose stack, migrations 000-006, and project docs.

Adds Gitea Actions workflows for deployment, automatic pull requests, and Renovate dependency updates.
2026-10-14 15:24:06 +02:00