Commit Graph
665 Commits
Author SHA1 Message Date
bruno 7b2fa01b0a fix: positionnement des cartes selon les labels et mise à jour après édition
CI / test (push) Failing after 8s
CI / lint (push) Failing after 4s
- create_issue: utilise _issue_column() au lieu de hardcoder 'Backlog'
- update_issue_api: recalcule la colonne après changement de labels
- update_issue_api: utilise l'endpoint PUT /labels au lieu de PATCH (Gitea ignore labels dans PATCH)
- webhooks: utilise _issue_column() pour 'opened'/'reopened'
- saveIssueEdit: rafraîchit le board (HTMX) après édition au lieu de rouvrir la modale
- update_issue_labels: corrigé pour utiliser PUT /issues/{id}/labels (liste d'entiers)
2026-07-08 11:27:56 -04:00
bruno 6ca376a675 fix: JS syntax error in renderCardDetail breaking all interactivity
CI / test (push) Failing after 4s
CI / lint (push) Failing after 3s
Root cause: operator precedence bug with stray ')' in:
  '...+(card.priority||"Medium")===p?"selected":"")+'>...
The ')+' created an unmatched parenthesis, causing SyntaxError
that stopped ALL JS event handlers (dblclick, drag-drop, buttons).

Fix: replaced string concatenation with template literals ('')
throughout renderCardDetail, eliminating escape/quoting issues.
2026-07-08 10:53:32 -04:00
bruno ae41937b03 feat: multi-label selection + double-click column to create issue
CI / test (push) Failing after 4s
CI / lint (push) Failing after 4s
- Labels now rendered as checkboxes (not single-select dropdown)
  in both create modal and edit form
- ALL_LABELS and ALL_MILESTONES passed as JSON to JS
- Double-click on empty column area opens create modal
  (pre-fills with that column name in title placeholder context)
- '+ Issue' button also opens the same modal
- Removed old inline new-issue-form (Alpine x-show), replaced with modal
- Create modal: title, body, multi-label checkboxes, milestone, assignee
- Edit form: title, body, multi-label checkboxes, assignee
- CSS: .label-checkboxes + .label-cb styles
2026-07-08 10:47:54 -04:00
bruno 3e78d4343c feat: full inline issue editing (title + body + assignee)
CI / test (push) Failing after 4s
CI / lint (push) Failing after 4s
Replaced bare prompt() with proper edit form in card modal:
- showEditForm: renders title input + body textarea + assignee field
- saveIssueEdit: PATCH /api/issues/... with title, body, assignee
- 'Annuler' button returns to card detail view
- Old editIssueInline (prompt only) removed
- Added .form-label CSS style
2026-07-08 10:18:28 -04:00
bruno 68f2b3f03b fix: issues with pull_request:null no longer classified as PRs
CI / test (push) Failing after 4s
CI / lint (push) Failing after 4s
Gitea API returns 'pull_request': null for regular issues.
Old filter 'pull_request' in issue matched the key even when null,
sending ALL issues to the PRs section instead of the Kanban columns.
Fixed: i.get('pull_request') — null is falsy, real PR dict is truthy.

Also: labels/milestones dropdowns empty = repo has none configured in Gitea.
2026-07-08 10:14:28 -04:00
bruno 492ae7b83b fix: notes save + all HTMX POST now send CSRF token
CI / test (push) Failing after 4s
CI / lint (push) Failing after 3s
- base.html: inject CSRF token into HTMX hx-headers via inline script
- htmx:configRequest event updates CSRF on every request
- HTMX loaded synchronously (no defer) so config runs before body parsed
- Notes save now works, issue creation works, all POST protected
2026-07-08 10:04:15 -04:00
bruno d15cfb1d33 fix: login button works, header no longer overflows
CI / test (push) Failing after 4s
CI / lint (push) Failing after 4s
- dashboard.py: decode session cookie and pass user to template
- notes.py: pass user to template (both GET and POST)
- CSS: .header-right flex layout, #user-info styles, min-height instead of fixed height
- Removed duplicate #user-info CSS block
- Login now properly shows admin/Deconnexion after authentication
2026-07-08 10:00:30 -04:00
bruno a67f42bfe6 fix: resolve 3 critical UI bugs
CI / test (push) Failing after 4s
CI / lint (push) Failing after 3s
1. Refresh button no longer doubles header
   - Added ?fragment=1 param to filter/refresh HTMX requests
   - Board route returns board_fragment.html (columns only) for fragment requests
   - Refresh button uses window.location.reload() for full page reload

2. No more raw JSON in header
   - base.html: user info rendered server-side via template variable
   - board.py: decodes session cookie, passes user to template
   - Dashboard/board templates show Login/Deconnexion based on auth state

3. New issue form works
   - Replaced HTMX post with JS fetch (handleNewIssue)
   - Adds CSRF token to form submission
   - Reloads page on successful creation
   - Cleaner error handling
2026-07-08 09:45:24 -04:00
bruno e72c0dcbd8 fix: board 404 returns clean page, not 500
CI / test (push) Failing after 3s
CI / lint (push) Failing after 4s
- board.py: catch httpx.HTTPStatusError 404 and show 'Projet introuvable' page
- all functional tests pass: dashboard (50 unique), board, issues, checklists, notes, CSRF
2026-07-08 09:37:51 -04:00
bruno 69803c4c4a fix: remove duplicate projects from dashboard
CI / test (push) Failing after 4s
CI / lint (push) Failing after 4s
Gitea's /api/v1/user/repos already includes all org repos the user
has access to. Fetching org repos separately added duplicates.
Removed the redundant org-repo loop from dashboard and /api/projects.
Also fixed template to use repo.owner.login instead of _org hack.
2026-07-08 09:30:33 -04:00
bruno 2b83c658f6 fix: :memory: db handling + tests (7/7 pass, +csrf +auth tests)
CI / test (push) Failing after 4s
CI / lint (push) Failing after 4s
- config: handle sqlite:///:memory: properly in db_path
- db: skip mkdir for :memory: path
- tests: use temp file instead of :memory: (avoids per-connection DB isolation)
- tests: added test_csrf_rejected (403) and test_auth_user
2026-07-08 09:25:52 -04:00
bruno 5a124d1328 v0.3.0: OAuth2, CSRF, rate limiting, issue CRUD, webhooks, card detail, checklists
CI / test (push) Failing after 5s
CI / lint (push) Failing after 4s
- OAuth2 Gitea (login/callback/logout) with fallback admin mode
- Session management with signed cookies (itsdangerous, 7 days)
- CSRF protection middleware on all POST/PUT/PATCH/DELETE
- Rate limiting in-memory (60 req/min per IP)
- Issue creation from FlowDeck (POST /api/issues/{owner}/{repo})
- Inline issue editing (PATCH /api/issues/{owner}/{repo}/{issue_id})
- Card detail modal (double-click): description, labels, comments
- Checklists with toggleable items (CRUD endpoints + UI)
- Priority + due date editable on cards
- Webhook receiver (POST /api/webhook) with HMAC-SHA256
- Auto-register/status webhooks for repos
- GiteaClient: create_issue, update_issue, get_comments, webhooks, collaborators
- New DB tables: users, user_tokens, checklists, checklist_items
- CSS: modal, forms, checklists, comments, PR section
2026-07-08 09:23:57 -04:00
bruno 87862b64b8 docs: CONTRIBUTING.md + CI pipeline Gitea Actions
CI / test (push) Failing after 7s
CI / lint (push) Failing after 4s
2026-07-08 09:02:02 -04:00
bruno 336c7d8dfe feat: FlowDeck v0.2.0 — Kanban Gitea intégré
- Dashboard projets Gitea (user + orgs)
- Board Kanban 5 colonnes avec drag & drop (SortableJS)
- Sync bidirectionnelle colonnes ↔ labels Gitea
- Filtres milestone/label/assignee
- Notes Markdown par projet
- API REST (/api/health, /api/move, /api/col-mapping…)
- Colonnes custom, WIP limits
- Thème clair/sombre
- Cache Gitea TTL
- Docker + docker-compose
- Tests pytest
- Docs: README, ARCHITECTURE, CHANGELOG, ROADMAP
2026-07-08 08:41:31 -04:00
bruno 90f090c785 Initial commit 2026-07-08 08:33:33 -04:00