Skip to content

[WIP] Add proposal detail edit flow and supporting service layer#1

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/worried-quokka
Closed

[WIP] Add proposal detail edit flow and supporting service layer#1
Copilot wants to merge 1 commit intomainfrom
copilot/worried-quokka

Conversation

Copy link
Copy Markdown

Copilot AI commented Dec 2, 2025

  • Understand the repository structure and existing implementation
  • Run tests to identify issues
  • Fix missing Dict import in service/stream_type_service.py
  • Verify all 50 tests pass
  • Request code review
  • Run security checks
Original prompt

Feature: Proposal detail edit + ProposalService, CSRF, tests

This PR implements the Proposal detail edit flow and supporting service layer.

Summary of changes:

  • Add service/proposal_service.py with update_proposal that maps and persists user-editable fields.
  • Convert templates/proposal_detail.html into an edit POST form and include csrf_token().
  • Implement POST handling in route/proposal_route.py to construct ProposalUpdateRequest and call ProposalService.update_proposal.
  • Add tests/unit/test_proposal_update.py to exercise the edit path and assert DB changes.
  • Add flash rendering to templates/proposals.html and include CSRF hidden inputs in approve form.
  • Disable CSRF in tests (tests/conftest.py) for now to simplify test execution.
  • Add specs/004-proposal-edit/README.md documenting the feature and next steps.

Test status:

  • All unit tests pass locally: 50 passed.

Notes for reviewers:

  • Stage 2 items remain (integration test for edit->approve, optional server-side validation).
  • CSRF is enabled in the app, but disabled in test config for simplicity; we can add test-side token handling if you prefer.

Please review and I can follow up with integration tests or stricter validation as requested.

Created from VS Code via the GitHub Pull Request extension.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

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