Skip to content

Split the app into subapps, adding categories to it - #14

Merged
fillipe-gsm merged 15 commits into
masterfrom
10-consider-building-a-section-to-handle-categories
Dec 9, 2025
Merged

Split the app into subapps, adding categories to it#14
fillipe-gsm merged 15 commits into
masterfrom
10-consider-building-a-section-to-handle-categories

Conversation

@fillipe-gsm

Copy link
Copy Markdown
Owner

Handles #10


This pull request does two things:

  • It creates a new categories sub-app to the main app;
  • It splits the original tasks into its own sub-app tasks as well.

This adds a breaking change to everything, so now the previous kanban-cli add should become kanban-cli tasks add and so on.

Now, instead of `kanban-cli view-all` we should run `kanban-cli tasks
view-all`, for instance.

This should make this more organized and make more sense when adding
`categories` as a new app
This required a bunch of moving around and changes in a bunch of files
A category with linked tasks cannot be deleted to prevent issues with
data integrity.
It should now be possible to add, view, edit and delete categories from
the cli via the `categories` subapp.
@fillipe-gsm
fillipe-gsm requested a review from Copilot November 17, 2025 22:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR restructures the application by splitting functionality into separate sub-apps for tasks and categories, introducing a breaking CLI change where commands now require a subcommand prefix (e.g., kanban-cli tasks add instead of kanban-cli add).

Key Changes:

  • Moved the Category model from src/tasks/models/ to a new src/categories/models/ module
  • Created a new categories sub-app with CRUD operations for category management
  • Refactored the main app to register both tasks and categories as separate Typer sub-applications

Reviewed Changes

Copilot reviewed 34 out of 42 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/app/app.py Refactored to register tasks and categories as sub-apps instead of direct commands
src/tasks/tasks_app.py New file extracting task-related commands into a separate Typer app
src/categories/categories_app.py New file implementing category management commands
src/categories/models/category.py Moved from tasks module and added new methods for listing and editing
src/categories/controllers/*.py New controllers for category CRUD operations
src/categories/presenters/*.py New presenters for category-related UI output
src/tasks/models/task.py Updated import path for Category model
tests/**/*.py Updated import paths and test invocations to match new app structure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/categories/presenters/test_view_all_presenter.py
Comment thread tests/categories/presenters/test_no_category_presenter.py
Comment thread tests/categories/presenters/test_no_categories_presenter.py
Comment thread tests/categories/controllers/test_add_controller.py Outdated
Comment thread src/categories/controllers/view_all_controller.py Outdated
Comment thread src/categories/controllers/add_controller.py Outdated
fillipe-gsm and others added 3 commits November 17, 2025 19:24
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@fillipe-gsm
fillipe-gsm merged commit 325b87c into master Dec 9, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants