Skip to content

Aditya Dhayapulay - Fix Add Task resources clearing during delayed loading - #5685

Open
adit24dhaya wants to merge 4 commits into
developmentfrom
fix/task-resource-selection-refresh
Open

adit24dhaya wants to merge 4 commits into
developmentfrom
fix/task-resource-selection-refresh

Conversation

@adit24dhaya

@adit24dhaya adit24dhaya commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

Original task request

Original task in Google Docs

Complete task captured directly from the original document; the requested wording is unchanged.

Original task request, part 1 of 1

Fix Jae's high-priority Phase 1 issue: task adding delay for the Resource field that refreshes it.

When task data arrived after the Add Task form opened, it could erase the selected Resources and other draft fields. A change in the member count could also reset Resource search text and focus. The form now keeps those values while background loading finishes.

Failed saves keep the form open with the draft intact for retry. Successful saves close the form, and opening another task starts a fresh draft.

Related PRs

None; frontend only.

Main changes explained

  • Reset the draft when Add Task opens, rather than when task counts or error state change.
  • Keep the Resource input mounted when the member count changes. Existing active-member filtering remains in place.
  • Close and reload only after the save action returns a task; restore Save after a failure.
  • Add 20 regression tests covering delayed responses, selections, Reset, failed saves and retry.

How to test

  1. Use Node 20 and the project's usual dependency setup, then run npm start.
  2. With an isolated test environment, sign in as Admin/Owner. Ensure the intended assignee belongs to the project, then open Other Links → Projects → WBS → Add Task.
  3. Delay task/member responses. Enter a task name, select a Resource and type a Resource search before those responses finish.
  4. Verify the selected Resource, draft details, search text and focus remain after loading completes. Inactive members should not appear in suggestions.
  5. Simulate a failed task POST. Verify the form stays open with its draft, Save becomes available again, and a successful retry sends the retained selection.
  6. Check Reset, reopening after success, and mobile/desktop layouts in light and dark modes.

Validation: 150 Projects/reducer tests passed, including 20 new regression tests; 120 browser assertions passed across four viewport/theme cases. Production build and changed-file ESLint passed. The commit hook also passed lint checks.

Requests were mocked; browser fixtures used the real form and Resource picker with stubbed rich-text editors. No shared-development data was written. A real-action test confirms a notification failure after task creation still completes the save.

Screenshots or videos of changes

Eight UI screenshots, a code-diff screenshot and a short captioned walkthrough are prepared locally for the weekly submission; media attachments have not yet been uploaded to this PR.

Note

This change targets the Add Task form. Existing dark-dropdown contrast is outside its scope. Testing does not claim a full authenticated end-to-end run or server-side idempotency for a response lost after task creation.

Preserve task drafts and Resource search state when background task and member responses arrive. Keep failed saves open so users can retry without re-entering their selections.

Add regression coverage for delayed refreshes, resets, failed requests, retries, and notification failures after task creation.
@netlify

netlify Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit b6d13ee
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6adef6350bd0f3dfb0124aa1
😎 Deploy Preview https://deploy-preview-5685--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Reuse the clock fixture already present on development so dated sample events remain available to the sorting test. Restore real timers after each case; do not change production behavior.

Unblock the unrelated date-sensitive CI failure on PR #5685.
@adit24dhaya

Copy link
Copy Markdown
Contributor Author

Pushed a test-only fix for the CI failure: the Activity List test now uses a fixed clock so its sample events do not expire as the date changes. This is the same fixture fix already on development; the resource-selection code is unchanged. All 47 focused WBS/detail and Activity List tests passed after the commit, along with lint. New GitHub checks are pending.

@one-community one-community changed the title Fix Add Task resources clearing during delayed loading Aditya D - Fix Add Task resources clearing during delayed loading Oct 26, 2026
@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Oct 26, 2026
@adit24dhaya adit24dhaya changed the title Aditya D - Fix Add Task resources clearing during delayed loading Aditya Dhayapulay - Fix Add Task resources clearing during delayed loading Oct 26, 2026
Preserve the original Google Doc request so reviewers can compare the implementation with the assigned requirements.
Restore the previous file tree at the author's request; retain the images locally for manual attachment.
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants