Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
a09fe73
docs(task): design and plan for agile board epics and stories
Aug 19, 2026
14ce249
feat(project): add BoardGroup entity and repository
Aug 19, 2026
67f0e2a
fix(test): repair pre-existing e2e breakage
Aug 19, 2026
00bcedd
feat(project): enforce BoardGroup depth with SQLite triggers
Aug 19, 2026
cb364c7
feat(project): CRUD for epics and stories
Aug 19, 2026
32b784b
feat(project): agile view mode, default columns, group in task move
Aug 19, 2026
7fdc937
feat(projects): agile board view with nested epics and stories
Aug 19, 2026
b9d6d58
fix(projects): show tasks without a column on the agile board
Aug 19, 2026
a72da71
feat(projects): agile drag-and-drop, hide goals in agile projects
Aug 19, 2026
a869353
fix(project): keep task group on moves that do not send groupId
Aug 19, 2026
5c6474c
fix(project): set userId when creating a board group
Aug 19, 2026
da68d02
docs(task): record verify results for agile board
Aug 19, 2026
b8861fc
test(project): cover epic deletion cascade on real data
Aug 19, 2026
5914a77
docs(task): conclude agile board epics and stories
Aug 19, 2026
5d9ee78
docs: note SQLite trigger fragility, mock-spec blind spot, agile boar…
Aug 19, 2026
4847aec
fix(projects): make the whole agile cell accept a drop
Aug 20, 2026
412d86f
fix(projects): let vuedraggable own the gesture inside agile cells
Aug 20, 2026
fe88342
feat(projects): replace agile board's null-column lane with a backlog…
Aug 20, 2026
6b4179c
chore(projects): drop temporary agile drag logging
Aug 23, 2026
14b00b1
style(projects): give epic and story real depth, label epic-level tasks
Aug 23, 2026
99bd653
style(tasks): drop compact card title to 13px
Aug 23, 2026
c33bcb9
style(projects): give board cards a real surface so the layers stop m…
Aug 23, 2026
5527b0d
style(projects): separate epics and stories by chrome versus canvas
Aug 23, 2026
5aa0e44
docs(task): design and plan for agile as a project type
Aug 24, 2026
3071a95
feat(project): add project type with migration for existing agile pro…
Aug 24, 2026
cce93ab
style(backend): apply prettier to goal and task modules
Sep 28, 2026
4550ef4
docs(task): keep legacy viewMode on migrated agile projects
Sep 28, 2026
e1270d3
feat(project): drive column seeding and guards from project type
Sep 28, 2026
f4b3aa1
feat(task): forbid moving tasks out of an agile project
Sep 28, 2026
a9391a0
feat(projects): choose project type at creation, drop the agile view …
Sep 28, 2026
60c65d2
feat(projects): stop offering forbidden task drops in the sidebar
Sep 28, 2026
78425f4
docs(task): record execute deviations for agile project type
Sep 28, 2026
73fb457
fix(task): allow null projectId in task DTO types
Sep 28, 2026
fc4df28
docs(task): record verify results for agile project type
Sep 28, 2026
216b369
docs(project): describe project type migration contract in Russian
Sep 28, 2026
59c61a3
docs(task): conclude agile project type
Sep 28, 2026
ba6cdfe
docs: describe agile as a project type in CLAUDE.md
Sep 28, 2026
0775ccb
docs(task): design for epics and stories management UI
Sep 28, 2026
db75d17
docs(task): plan for epics and stories management UI
Sep 28, 2026
cd2e5a4
docs(task): start executing epics and stories UI
Sep 28, 2026
8347755
feat(task): accept groupId on task create and update
Sep 29, 2026
e938c71
feat(project): start and due dates on epics
Sep 29, 2026
8b8c48a
fix(db): drop board-group triggers before schema synchronize
Sep 29, 2026
1c64932
test(db): rebuild board_groups like synchronize in the trigger surviv…
Sep 29, 2026
2a52c0f
docs(task): record startup trigger fix deviation
Sep 29, 2026
8d47781
feat(projects): per-project group cache and detail navigation state
Sep 29, 2026
52ae6ce
feat(projects): manage epics and stories on the agile board
Sep 29, 2026
b09c658
feat(projects): epic and story detail dialog
Sep 29, 2026
4c12562
feat(tasks): epic and story field and breadcrumbs in the task dialog
Sep 29, 2026
b7f4da3
fix(projects): keep epic controls visible and inline edits focused af…
Sep 29, 2026
1175c38
fix(projects): close the group card before delete confirm, format epi…
Sep 29, 2026
5a38777
docs(task): record verify results for epics and stories UI
Sep 29, 2026
330d187
docs(task): conclude epics and stories UI
Sep 29, 2026
51a5545
docs: startup trigger handling, one-modal navigation and menu focus i…
Sep 29, 2026
b77fbe9
docs(task): start agile sprints task
Sep 29, 2026
8f5f8dd
docs(task): design for agile sprints
Sep 29, 2026
8153ca8
docs(task): plan for agile sprints
Sep 29, 2026
3f76004
docs(task): start executing agile sprints
Sep 29, 2026
05a4811
feat(project): sprints with start and complete
Sep 29, 2026
e1b180a
feat(task): assign tasks to sprints
Sep 29, 2026
752219f
fix(task): drop the old project's column on project change, accept an…
Sep 29, 2026
364d561
feat(projects): sprint store and helpers
Sep 29, 2026
4f79c16
fix(projects): optional sprint name on create, dates on sprint update…
Sep 29, 2026
d70dfbf
feat(projects): board tabs and active sprint board
Sep 29, 2026
2162994
feat(projects): backlog tab with sprints and epics panel
Sep 29, 2026
3403340
feat(projects): start, edit, complete and delete sprints
Sep 29, 2026
991e635
feat(tasks): sprint field in the task dialog
Sep 29, 2026
c92ec21
docs(task): record execute deviations for agile sprints
Sep 29, 2026
bf10908
docs(task): record verify results for agile sprints
Sep 29, 2026
ac8336a
fix(project): sprint order at queue end, keep a column on move, 400 o…
Sep 29, 2026
adbf804
docs(task): conclude agile sprints
Sep 29, 2026
5f40c2c
docs: sprints in CLAUDE.md, drop the removed no-column lane
Sep 29, 2026
267505e
docs(task): design for agile releases
Sep 30, 2026
f08d305
docs(task): plan for agile releases
Sep 30, 2026
25ba815
feat(project): releases with release action and group assignment
Sep 30, 2026
7a03ac9
feat(projects): release store and helpers
Sep 30, 2026
59bf176
feat(projects): releases tab with release, edit and delete
Sep 30, 2026
27b5084
feat(projects): assign releases to tasks and whole stories
Sep 30, 2026
db6d63e
docs(tasks): release chip prop describes null as no release
Sep 30, 2026
18acaa3
fix(project): assigning a group to a release keeps tasks of released …
Sep 30, 2026
bcdbe6c
docs(task): record verify results for agile releases
Sep 30, 2026
73b97eb
fix(projects): keep the agile board mounted while tasks refetch
Sep 30, 2026
664cb22
docs: conclude agile releases, releases in CLAUDE.md
Sep 30, 2026
dd178af
docs(task): design and plan for task keys
Sep 30, 2026
871ae75
feat(task): per-project task numbers and project key prefix
Sep 30, 2026
c9d1e28
fix(project): deleting a project clears its tasks' numbers
Sep 30, 2026
0eb24d4
feat(projects): task key prefix in project settings, keys on tasks
Sep 30, 2026
dc3c4f9
fix(projects): keep backlog rows on one line, shrink the epic label b…
Sep 30, 2026
eaae602
docs(task): record verify results for task keys
Sep 30, 2026
68244e1
fix(tasks): take number, sprint and release from the server after a t…
Sep 30, 2026
fc1b92f
docs: conclude task keys, keys in CLAUDE.md
Sep 30, 2026
42e30eb
feat(projects): persist story releases and inherit them in new tasks
Oct 4, 2026
ff14241
feat(projects): plan stories in backlog and filter by epic
Oct 4, 2026
f46d3f6
fix(projects): handle released stories and constrain story drops
Oct 4, 2026
df9012b
docs(projects): document story planning and verification
Oct 4, 2026
91ca0a4
feat(projects): move stories and their tasks between sprints
Oct 7, 2026
0f96c44
feat(projects): plan whole stories with sprint menus and drag
Oct 7, 2026
86e19a6
docs(projects): record story sprint move validation
Oct 7, 2026
4c04c1c
feat(mcp): manage agile sprints and story planning
Oct 7, 2026
8e080ba
merge: integrate main before Agile release
Oct 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion CLAUDE.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- **📱 Три поверхности, один бэкенд.** Telegram-бот (telegraf), Telegram WebApp и обычный SPA — всё работает поверх одного REST API. Веб собран как PWA (offline, web-push, установка на домашний экран).
- **🧱 Чистая архитектура.** Бэкенд — Clean Architecture по модулям (порты в `domain/`, адаптеры в `infrastructure/`, оркестрация в сервисах). Фронтенд — Feature-Sliced Design. Границы слоёв реальны, а не декоративны.
- **🌍 Корректные таймзоны и локали.** Все операции с датами уважают IANA-таймзону пользователя; даты в БД хранятся в UTC и сдвигаются к wall-clock пользователя на границе домена. Календарь, локаль и первый день недели — из настроек пользователя.
- **🗓 Богатый UI задач.** Inbox, проекты со списками и board-колонками, повторяющиеся задачи, календарь с drag-create по сетке часов, Pomodoro-таймер, два независимых drag-and-drop-движка (кастомный на PointerEvents + vuedraggable).
- **🗓 Богатый UI задач.** Inbox, проекты со списками и board-колонками, повторяющиеся задачи, календарь с drag-create по сетке часов, Pomodoro-таймер, два независимых drag-and-drop-движка (кастомный на PointerEvents + vuedraggable). Agile-проекты включают эпики, истории, спринты и релизы; историю можно перенести в спринт целиком с задачами через меню или drag-and-drop.
- **🔔 Уведомления.** Web-push (VAPID) с подписками на устройство.

---
Expand Down
2 changes: 2 additions & 0 deletions alfy-bot-frontend/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<script setup lang="ts">
import { ConfirmDialog } from '@/components/ui/confirm-dialog'
import GroupDetailDialog from '@/features/projects/ui/GroupDetailDialog.vue'
import TaskDragGhost from '@/features/tasks/ui/TaskDragGhost.vue'
</script>

<template>
<div class="min-h-[100dvh] transition-colors">
<RouterView />
<ConfirmDialog />
<GroupDetailDialog />
<TaskDragGhost />
</div>
</template>
32 changes: 32 additions & 0 deletions alfy-bot-frontend/src/features/projects/api/groups-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import type { BoardGroup, BoardGroupNode, CreateGroupPayload, UpdateGroupPayload } from '../model/types'
import { api } from '@/api/client'

export function fetchGroups(projectId: string) {
return api.get<BoardGroupNode[]>(`/projects/${projectId}/groups`)
}

export function createGroup(projectId: string, data: CreateGroupPayload) {
return api.post<BoardGroup>(`/projects/${projectId}/groups`, data)
}

export function updateGroup(projectId: string, id: string, data: UpdateGroupPayload) {
return api.patch<BoardGroup>(`/projects/${projectId}/groups/${id}`, data)
}

export function deleteGroup(projectId: string, id: string) {
return api.delete(`/projects/${projectId}/groups/${id}`)
}

export function reorderGroups(projectId: string, orderedIds: string[]) {
return api.patch(`/projects/${projectId}/groups/reorder`, { orderedIds })
}

/** Назначает или снимает релиз истории и её задач; возвращает число изменённых задач. */
export function setGroupRelease(projectId: string, groupId: string, releaseId: string | null) {
return api.patch<{ updated: number }>(`/projects/${projectId}/groups/${groupId}/release`, { releaseId })
}

/** Назначает спринт истории и её задач; возвращает число изменённых задач. */
export function setGroupSprint(projectId: string, groupId: string, sprintId: string | null) {
return api.patch<{ updated: number }>(`/projects/${projectId}/groups/${groupId}/sprint`, { sprintId })
}
32 changes: 32 additions & 0 deletions alfy-bot-frontend/src/features/projects/api/releases-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import type {
AssignGroupToReleasePayload,
CreateReleasePayload,
Release,
ReleaseActionPayload,
UpdateReleasePayload,
} from '../model/types'
import { api } from '@/api/client'

export function fetchReleases(projectId: string) {
return api.get<Release[]>(`/projects/${projectId}/releases`)
}

export function createRelease(projectId: string, data: CreateReleasePayload) {
return api.post<Release>(`/projects/${projectId}/releases`, data)
}

export function updateRelease(projectId: string, id: string, data: UpdateReleasePayload) {
return api.patch<Release>(`/projects/${projectId}/releases/${id}`, data)
}

export function deleteRelease(projectId: string, id: string) {
return api.delete(`/projects/${projectId}/releases/${id}`)
}

export function releaseRelease(projectId: string, id: string, data: ReleaseActionPayload) {
return api.post<Release>(`/projects/${projectId}/releases/${id}/release`, data)
}

export function assignGroupToRelease(projectId: string, id: string, data: AssignGroupToReleasePayload) {
return api.post<{ updated: number }>(`/projects/${projectId}/releases/${id}/assign-group`, data)
}
32 changes: 32 additions & 0 deletions alfy-bot-frontend/src/features/projects/api/sprints-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import type {
CompleteSprintPayload,
CreateSprintPayload,
Sprint,
StartSprintPayload,
UpdateSprintPayload,
} from '../model/types'
import { api } from '@/api/client'

export function fetchSprints(projectId: string) {
return api.get<Sprint[]>(`/projects/${projectId}/sprints`)
}

export function createSprint(projectId: string, data: CreateSprintPayload) {
return api.post<Sprint>(`/projects/${projectId}/sprints`, data)
}

export function updateSprint(projectId: string, id: string, data: UpdateSprintPayload) {
return api.patch<Sprint>(`/projects/${projectId}/sprints/${id}`, data)
}

export function deleteSprint(projectId: string, id: string) {
return api.delete(`/projects/${projectId}/sprints/${id}`)
}

export function startSprint(projectId: string, id: string, data: StartSprintPayload) {
return api.post<Sprint>(`/projects/${projectId}/sprints/${id}/start`, data)
}

export function completeSprint(projectId: string, id: string, data: CompleteSprintPayload) {
return api.post<Sprint>(`/projects/${projectId}/sprints/${id}/complete`, data)
}
66 changes: 66 additions & 0 deletions alfy-bot-frontend/src/features/projects/lib/agile-layout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import type { BoardGroupNode } from '../model/types'
import type { Task } from '@/features/tasks/model/types'

export interface AgileStoryRow {
story: BoardGroupNode
tasks: Task[]
}

export interface AgileEpicRow {
kind: 'epic'
epic: BoardGroupNode
stories: AgileStoryRow[]
epicTasks: Task[]
}

export interface AgileUngroupedRow {
kind: 'ungrouped'
tasks: Task[]
}

export type AgileRow = AgileEpicRow | AgileUngroupedRow

export function buildAgileRows(groups: BoardGroupNode[], tasks: Task[]): AgileRow[] {
const sortedEpics = [...groups].sort((a, b) => a.order - b.order)

const knownGroupIds = new Set<string>()
for (const epic of sortedEpics) {
knownGroupIds.add(epic.id)
for (const story of epic.children) {
knownGroupIds.add(story.id)
}
}

const rows: AgileRow[] = sortedEpics.map((epic) => {
const sortedStories = [...epic.children].sort((a, b) => a.order - b.order)
const stories: AgileStoryRow[] = sortedStories.map(story => ({
story,
tasks: tasks.filter(task => task.groupId === story.id),
}))
const epicTasks = tasks.filter(task => task.groupId === epic.id)

return { kind: 'epic', epic, stories, epicTasks }
})

const ungroupedTasks = tasks.filter(
task => !task.groupId || !knownGroupIds.has(task.groupId),
)
rows.push({ kind: 'ungrouped', tasks: ungroupedTasks })

return rows
}

/**
* Groups tasks by their columnId, preserving `null` (no column assigned)
* as an explicit map key so those tasks are never dropped.
*/
export function groupTasksByColumn(tasks: Task[]): Map<string | null, Task[]> {
const map = new Map<string | null, Task[]>()
for (const task of tasks) {
const key = task.columnId ?? null
const arr = map.get(key) ?? []
arr.push(task)
map.set(key, arr)
}
return map
}
15 changes: 15 additions & 0 deletions alfy-bot-frontend/src/features/projects/lib/api-error.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Текст ошибки для показа пользователю: сообщение сервера
* (`response.data.message`, массив склеивается через «; »), иначе `message`
* самой ошибки, иначе `fallback`.
*/
export function apiErrorMessage(err: unknown, fallback: string): string {
const serverMessage = (err as { response?: { data?: { message?: unknown } } } | null)?.response?.data?.message
if (typeof serverMessage === 'string' && serverMessage.length > 0)
return serverMessage
if (Array.isArray(serverMessage) && serverMessage.length > 0)
return serverMessage.join('; ')
if (err instanceof Error && err.message.length > 0)
return err.message
return fallback
}
56 changes: 56 additions & 0 deletions alfy-bot-frontend/src/features/projects/lib/backlog-stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import type { BoardGroupNode } from '../model/types'
import type { Task } from '@/features/tasks/model/types'

/** Выбранный эпик; all показывает всё, none — задачи без эпика. */
export type EpicFilter = 'all' | 'none' | string

/** История с видимыми задачами и прогрессом всех её задач текущего блока. */
export interface BacklogStory {
story: BoardGroupNode
epic: BoardGroupNode
tasks: Task[]
done: number
total: number
}

/** Проверяет принадлежность задачи выбранному эпику без изменения данных. */
export function matchesEpic(task: Task, tree: BoardGroupNode[], filter: EpicFilter): boolean {
if (filter === 'all')
return true
const epic = tree.find(node => node.id === task.groupId || node.children.some(story => story.id === task.groupId))
return filter === 'none' ? !epic : epic?.id === filter
}

/**
* Группирует видимые задачи по историям. Истории без задач показываются
* в назначенном спринте; скрытые задачи не делают историю пустой.
* Прогресс считается по полному набору задач блока, независимо от фильтров.
*/
export function backlogStories(
tree: BoardGroupNode[],
visibleTasks: Task[],
projectTasks: Task[],
sprintId: string | null,
filter: EpicFilter,
showCompleted: boolean,
): BacklogStory[] {
return tree.filter(epic => filter === 'all' || epic.id === filter).flatMap(epic =>
epic.children.flatMap((story) => {
const all = projectTasks.filter(task => task.groupId === story.id)
const tasks = visibleTasks.filter(task => task.groupId === story.id)
const block = all.filter(task => (task.sprintId ?? null) === sprintId)
const empty = block.length === 0 && (story.sprintId ?? null) === sprintId
&& (all.length === 0 || story.sprintId != null)
&& (showCompleted || story.status !== 'done')
if (tasks.length === 0 && !empty)
return []
return [{ story, epic, tasks, done: block.filter(task => task.completed).length, total: block.length }]
}),
)
}

/** Возвращает задачи без истории, включая задачи непосредственно в эпике. */
export function standaloneBacklogTasks(tasks: Task[], tree: BoardGroupNode[]): Task[] {
const storyIds = new Set(tree.flatMap(epic => epic.children.map(story => story.id)))
return tasks.filter(task => !task.groupId || !storyIds.has(task.groupId))
}
105 changes: 105 additions & 0 deletions alfy-bot-frontend/src/features/projects/lib/group-tree.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import type { BoardGroupNode } from '../model/types'
import type { Task } from '@/features/tasks/model/types'
import { pluralRu } from '@/lib/plural'

/** Ищет узел (эпик или историю) по id в дереве групп проекта. */
export function findGroup(tree: BoardGroupNode[], id: string): BoardGroupNode | undefined {
for (const node of tree) {
if (node.id === id)
return node
const found = findGroup(node.children, id)
if (found)
return found
}
return undefined
}

/**
* Путь к группе: её родительский эпик (или сама группа, если это эпик) и
* история, если `groupId` указывает на историю. `null`, если id не найден.
*/
export function groupPath(
tree: BoardGroupNode[],
groupId: string,
): { epic: BoardGroupNode, story: BoardGroupNode | null } | null {
for (const epic of tree) {
if (epic.id === groupId)
return { epic, story: null }
const story = epic.children.find(child => child.id === groupId)
if (story)
return { epic, story }
}
return null
}

/**
* Текст для поля/чипа «Эпик / История»: «Эпик › История» для истории,
* «Эпик» для самого эпика, «Без эпика» для `groupId: null`. `null`, если
* `groupId` указан, но не найден в переданном дереве (дерево ещё грузится).
*/
export function groupLabel(tree: BoardGroupNode[], groupId: string | null): string | null {
if (groupId === null)
return 'Без эпика'

const path = groupPath(tree, groupId)
if (!path)
return null

return path.story ? `${path.epic.title} › ${path.story.title}` : path.epic.title
}

/**
* Id задач, принадлежащих группе: для эпика — id самого эпика и всех его
* историй; для истории — только её собственный id.
*/
export function groupTaskIds(group: BoardGroupNode): string[] {
return [group.id, ...group.children.map(child => child.id)]
}

/** Прогресс группы: сколько из её задач (см. {@link groupTaskIds}) завершено. */
export function groupProgress(group: BoardGroupNode, tasks: Task[]): { done: number, total: number } {
const ids = new Set(groupTaskIds(group))
const groupTasks = tasks.filter(task => task.groupId != null && ids.has(task.groupId))
return {
done: groupTasks.filter(task => task.completed).length,
total: groupTasks.length,
}
}

/**
* Последствия удаления группы: число дочерних историй (0 для истории) и
* число задач, которые останутся без группы (задачи самой группы и, для
* эпика, задачи всех его историй).
*/
export function deletionImpact(group: BoardGroupNode, tasks: Task[]): { stories: number, tasks: number } {
const ids = new Set(groupTaskIds(group))
const affectedTasks = tasks.filter(task => task.groupId != null && ids.has(task.groupId))
return {
stories: group.children.length,
tasks: affectedTasks.length,
}
}

/**
* Текст подтверждения удаления эпика/истории: называет последствия
* ({@link deletionImpact}) до подтверждения. Один источник для доски и
* карточки группы — тексты не должны расходиться.
*/
export function groupDeletionMessage(group: BoardGroupNode, impact: { stories: number, tasks: number }): string {
const parts = [`Удалить ${group.type === 'epic' ? 'эпик' : 'историю'} „${group.title}“?`]

if (group.type === 'epic' && impact.stories > 0) {
const verb = pluralRu(impact.stories, ['удалится', 'удалятся', 'удалятся'])
const word = pluralRu(impact.stories, ['история', 'истории', 'историй'])
parts.push(`Вместе с ним ${verb} ${impact.stories} ${word}.`)
}

if (impact.tasks > 0) {
const remainVerb = pluralRu(impact.tasks, ['останется', 'останутся', 'останутся'])
const moveVerb = pluralRu(impact.tasks, ['переедет', 'переедут', 'переедут'])
const word = pluralRu(impact.tasks, ['задача', 'задачи', 'задач'])
parts.push(`${impact.tasks} ${word} ${remainVerb} и ${moveVerb} в „Без эпика“.`)
}

return parts.join(' ')
}
Loading
Loading