feat: return-to-project redirects from create/edit forms

When creating or editing items from a project detail tab, users now
return to that project's tab instead of the entity's own page.
Edit links pass from_project param; forms include hidden field.
Reassigning to a different project redirects to the new project.
Decisions/meetings create from project context inserts junction rows.
File uploads from project context redirect back to project files tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 18:28:15 +00:00
parent ba9c36e691
commit c7a07ed280
18 changed files with 125 additions and 27 deletions

View File

@@ -379,6 +379,12 @@ async def upload_file(
# Redirect back to context or file list
if context_type and context_id:
if context_type == "project":
return RedirectResponse(url=f"/projects/{context_id}?tab=files", status_code=303)
if context_type == "task":
return RedirectResponse(url=f"/tasks/{context_id}?tab=files", status_code=303)
if context_type == "meeting":
return RedirectResponse(url=f"/meetings/{context_id}?tab=files", status_code=303)
return RedirectResponse(
url=f"/files?context_type={context_type}&context_id={context_id}",
status_code=303,