[feature] Story management: add full CRUD routes and UI #26

Closed
opened 2026-05-05 08:06:31 +00:00 by casper-stevens · 2 comments
Member

Context

Identified in home#211 (Projects Widget v0.9 Alpha feedback): stories are absent from the kanban board and there is no way to create, view, or manage stories in the UI.

Current state

The Story model exists in models/story.rs with project_sid, milestone_sid, assignee_sid, and story_points fields. Service methods (load_all_stories_for_space, load_story_for_space) exist in services/mod.rs. Task.story_sid links tasks to stories.

However: there are zero HTTP routes for stories in web/server.rs. Stories are invisible in the UI.

Work required

  • Add routes in server.rs:
    • GET /c/:context/stories — list
    • GET /c/:context/stories/new + POST — create form
    • GET /c/:context/stories/:id — detail
    • GET /c/:context/stories/:id/edit + POST — edit form
  • Add handlers in handlers/mod.rs:
    • stories_list, stories_detail, story_new, story_create, story_edit, story_update
  • Add templates in templates/mod.rs:
    • StoriesListTemplate, StoryDetailTemplate, StoryFormTemplate
  • Story list should show project/milestone/assignee resolved by name (not SID)
  • Story detail should show linked tasks
  • Story form should have a project association dropdown
  • Add stories to the sidebar nav under Projects

Notes

  • Story points field should have a tooltip or label explaining its purpose (feedback: non-Agile users are confused by it)
  • Save/update should use the same link-field pattern as tasks (update_story_links)
## Context Identified in home#211 (Projects Widget v0.9 Alpha feedback): stories are absent from the kanban board and there is no way to create, view, or manage stories in the UI. ## Current state The `Story` model exists in `models/story.rs` with `project_sid`, `milestone_sid`, `assignee_sid`, and `story_points` fields. Service methods (`load_all_stories_for_space`, `load_story_for_space`) exist in `services/mod.rs`. `Task.story_sid` links tasks to stories. **However:** there are zero HTTP routes for stories in `web/server.rs`. Stories are invisible in the UI. ## Work required - Add routes in `server.rs`: - `GET /c/:context/stories` — list - `GET /c/:context/stories/new` + `POST` — create form - `GET /c/:context/stories/:id` — detail - `GET /c/:context/stories/:id/edit` + `POST` — edit form - Add handlers in `handlers/mod.rs`: - `stories_list`, `stories_detail`, `story_new`, `story_create`, `story_edit`, `story_update` - Add templates in `templates/mod.rs`: - `StoriesListTemplate`, `StoryDetailTemplate`, `StoryFormTemplate` - Story list should show project/milestone/assignee resolved by name (not SID) - Story detail should show linked tasks - Story form should have a project association dropdown - Add stories to the sidebar nav under Projects ## Notes - Story points field should have a tooltip or label explaining its purpose (feedback: non-Agile users are confused by it) - Save/update should use the same link-field pattern as tasks (`update_story_links`)
Author
Member

Implementation complete

Commit 7a1ee4c on development_casper adds full story CRUD.

What was added

Routes (web/server.rs)

  • GET /c/:context/stories — list
  • GET /c/:context/stories/new + POST — create
  • GET /c/:context/stories/:id — detail
  • GET /c/:context/stories/:id/edit + POST — edit

Handlersstories_list, stories_detail, story_new, story_create, story_edit, story_update

TemplatesStoriesListTemplate, StoryDetailTemplate, StoryFormTemplate

Servicessave_story, get_tasks_for_story, get_stories_for_project, get_stories_for_milestone

Sidebar — Stories entry added under Projects with bi-journal-bookmark icon

Notable details

  • Story list resolves project name and assignee name (not raw SIDs)
  • Story detail shows linked tasks via render_linked_section
  • Story form has project, milestone, and assignee dropdowns
  • Story points field has tooltip explaining the scale for non-Agile users
  • Acceptance criteria uses a textarea (one criterion per line)
  • save_story follows the same pattern as save_task through the OSIS SDK
  • links field preserved on update (same pattern as tasks)

Build: clean (19.24s) | Diff: +1121 / -4 lines across 5 files

## Implementation complete Commit `7a1ee4c` on `development_casper` adds full story CRUD. ### What was added **Routes** (`web/server.rs`) - `GET /c/:context/stories` — list - `GET /c/:context/stories/new` + `POST` — create - `GET /c/:context/stories/:id` — detail - `GET /c/:context/stories/:id/edit` + `POST` — edit **Handlers** — `stories_list`, `stories_detail`, `story_new`, `story_create`, `story_edit`, `story_update` **Templates** — `StoriesListTemplate`, `StoryDetailTemplate`, `StoryFormTemplate` **Services** — `save_story`, `get_tasks_for_story`, `get_stories_for_project`, `get_stories_for_milestone` **Sidebar** — Stories entry added under Projects with `bi-journal-bookmark` icon ### Notable details - Story list resolves project name and assignee name (not raw SIDs) - Story detail shows linked tasks via `render_linked_section` - Story form has project, milestone, and assignee dropdowns - Story points field has tooltip explaining the scale for non-Agile users - Acceptance criteria uses a textarea (one criterion per line) - `save_story` follows the same pattern as `save_task` through the OSIS SDK - `links` field preserved on update (same pattern as tasks) **Build:** clean (19.24s) | **Diff:** +1121 / -4 lines across 5 files
Author
Member

Implemented in commit 7a1ee4c: full Story CRUD — list/detail/create/edit templates and handlers, 4 routes, 4 service methods, sidebar entry under Projects, linked tasks display on detail page.

Implemented in commit 7a1ee4c: full Story CRUD — list/detail/create/edit templates and handlers, 4 routes, 4 service methods, sidebar entry under Projects, linked tasks display on detail page.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_biz#26
No description provided.