Skip to content

Fix/draft retrieval on refresh#1371

Merged
NishaSharma14 merged 9 commits intodevelopmentfrom
fix/draft-retrieval-on-refresh
Mar 23, 2026
Merged

Fix/draft retrieval on refresh#1371
NishaSharma14 merged 9 commits intodevelopmentfrom
fix/draft-retrieval-on-refresh

Conversation

@vcnainala
Copy link
Copy Markdown
Member

No description provided.

…match

findDefaultDraft only filtered by owner_id, which could return a draft
from a different team. When the user uploaded files to that draft and
refreshed at step 2, UserDrafts::execute() filtered by the current
team_id and the draft would not appear in results.
Add DraftController::show() with ownership verification so the frontend
can fetch a specific draft when it is not found in the pre-loaded team-
scoped list. This provides a fallback for drafts that were created under
a different team context.
selectStep(2) did not set draft_id in the query string, relying on it
persisting from step 1. Now it explicitly sets it. When a page refresh
at step 2 cannot find the draft in the team-scoped list, the frontend
falls back to a direct fetch via the new show endpoint.
@vcnainala vcnainala changed the base branch from main to development March 18, 2026 09:24
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.44%. Comparing base (b22a9ee) to head (d9abdea).
⚠️ Report is 1 commits behind head on development.

Additional details and impacted files
@@                Coverage Diff                @@
##             development    #1371      +/-   ##
=================================================
+ Coverage          71.42%   71.44%   +0.01%     
- Complexity          2415     2417       +2     
=================================================
  Files                210      210              
  Lines               9317     9326       +9     
=================================================
+ Hits                6655     6663       +8     
- Misses              2662     2663       +1     
Flag Coverage Δ
unittests 71.44% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vcnainala vcnainala requested a review from NishaSharma14 March 19, 2026 10:47
@NishaSharma14 NishaSharma14 merged commit ad1b83d into development Mar 23, 2026
4 of 5 checks passed
@NishaSharma14 NishaSharma14 deleted the fix/draft-retrieval-on-refresh branch March 23, 2026 13:13
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