Skip to content

Feature-3984: Edit Project Implementation#90

Merged
shweta2101 merged 16 commits into
developfrom
feature-3984-edit-project-tm
Jul 17, 2026
Merged

Feature-3984: Edit Project Implementation#90
shweta2101 merged 16 commits into
developfrom
feature-3984-edit-project-tm

Conversation

@shweta2101

@shweta2101 shweta2101 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

DevBoard Task

https://dev.azure.com/TDEI-UW/TDEI/_workitems/edit/3984/

Changes Implemented

Project Editing

  • Added a project edit page at:

    /workspace/:workspaceId/projects/:projectId/edit
    
  • Restricted project editing to project leads.

  • Added editable sections for:

    • Project description
    • Rich-text instructions
    • Custom imagery
    • Team members and roles
    • Project configuration
    • Project actions
  • Added dirty-state detection and confirmation before leaving with unsaved changes.

  • Disabled configuration changes after tasks have been generated or the project has left draft status.

  • Added project actions:

    • Reset all tasks
    • Close project
    • Permanently delete project
  • Added API methods for updating, resetting, closing, and deleting projects.

  • Added an edit button to the project details page for project leads.

  • Standardized task mutation errors through the shared HTTP error resolver.

Shared API Error Handling

Expanded resolveHttpErrorMessage() to support:

  • detail strings
  • Nested detail.message objects
  • FastAPI validation arrays using msg
  • Validation arrays using message
  • Top-level message
  • Top-level error
  • Plain-text responses
  • Existing-lock metadata containing task_number
  • Caller-provided fallback messages

The shared resolver is used by:

  • Project creation and editing
  • Contributor mutations
  • Task generation and saving
  • Task locking and unlocking
  • Task submission

Custom Imagery

  • Added custom-imagery input to project creation and editing.
  • Added JSON parsing and schema validation.
  • Added validation debouncing and stale-request protection.
  • Added typed custom-imagery models using ImagerySource.
  • Added conversion from project imagery configuration to Rapid imagery configuration.
  • Added project imagery during initial Rapid startup.
  • Added imagery when switching an already-loaded Rapid editor between workspaces.
  • Added custom imagery to the initial Rapid map hash.
  • Selected the configured imagery as the active Rapid background.

Rapid Authentication and Integration

  • Fixed an initialization race that allowed Rapid to fall back to its built-in OSM OAuth login.
  • Rapid authentication is now applied immediately after initialization begins.
  • Editor and uploader event registration happens after initialization finishes.
  • Prevented redirects to the OSM /login endpoint during changeset upload.

Confirmation Dialog Accessibility

Improved the confirmation dialog with:

  • role="dialog"
  • aria-modal="true"
  • Unique title IDs through useId()
  • Initial focus placement
  • Tab and Shift+Tab focus trapping
  • Escape-key handling
  • Focus restoration to the opening element
  • Disabled-state handling while actions are running
  • Event-listener cleanup during unmount

Impacted Areas Of Testing

Project Editing

  1. Sign in as a project lead.
  2. Open a project details page.
  3. Confirm the edit button is visible.
  4. Open the edit page.
  5. Verify all sections appear in the sidebar.
  6. Change the project description.
  7. Change the instructions.
  8. Save the project.
  9. Return to the project details page.
  10. Confirm the updated description and instructions are displayed.
  11. Sign in as a non-lead.
  12. Confirm the edit button is hidden.
  13. Navigate directly to the edit URL.
  14. Confirm access is rejected with a 403 response.

Contributor Management

  1. Open the Team Members section.
  2. Search for a workspace user by name or email.
  3. Assign a role and add the user.
  4. Confirm the user appears in the project member list.
  5. Change the user’s role.
  6. Reload the page and confirm the new role persists.
  7. Remove the user.

Project Actions

Reset Tasks

  1. Open the Actions section.
  2. Select Reset All Tasks.
  3. Confirm the confirmation dialog appears.
  4. Cancel and verify no action occurs.
  5. Reopen and confirm the action.
  6. Confirm navigation returns to the Tasks tab.
  7. Confirm task assignments and progress were reset.

Close Project

  1. Select Close Project.
  2. Confirm the action.
  3. Confirm the project status becomes completed.

Delete Project

  1. Create a disposable project.
  2. Select Delete Project.
  3. Confirm the destructive action.
  4. Confirm navigation returns to the project list.
  5. Confirm the project no longer appears.

Custom Imagery Validation

  1. Open project creation or editing.
  2. Enter invalid JSON.
  3. Confirm a validation error appears.
  4. Enter a JSON array instead of one imagery object.
  5. Confirm it is rejected.
  6. Enter an object that does not match the schema.
  7. Confirm schema validation errors appear.
  8. Enter a valid imagery object.
  9. Confirm the error clears.
  10. Save the project.
  11. Reload the page.
  12. Confirm the imagery JSON persists.

Example:

{
  "id": "example-imagery",
  "name": "Example Imagery",
  "type": "xyz",
  "url": "https://tiles.example.com/{z}/{x}/{y}.png",
  "icon": "https://example.com/icon.svg",
  "description": "Example imagery",
  "extent": {
    "polygon": [],
    "max_zoom": 19
  },
  "attribution": {
    "required": true,
    "text": "Example attribution",
    "url": "https://example.com/attribution"
  }
}

Rapid Custom Imagery

  1. Open a task belonging to a project with custom imagery.
  2. Confirm Rapid loads successfully.
  3. Confirm the project imagery appears in the imagery list.
  4. Confirm it is selected as the active background.
  5. Return to the project page.
  6. Open another project with different imagery without fully refreshing.
  7. Confirm the second project’s imagery is added and selected.
  8. Open a project without custom imagery.
  9. Confirm Rapid still loads normally.

Screenshots:

Screenshot 2026-07-14 at 6 03 21 PM Screenshot 2026-07-14 at 6 03 34 PM Screenshot 2026-07-14 at 6 04 02 PM Screenshot 2026-07-14 at 7 33 25 PM Screenshot 2026-07-14 at 7 33 37 PM Screenshot 2026-07-14 at 7 33 47 PM Screenshot 2026-07-14 at 7 33 59 PM Screenshot 2026-07-14 at 7 34 05 PM Screenshot 2026-07-14 at 7 34 13 PM Screenshot 2026-07-16 at 1 46 16 PM

Summary

  • Added project editing at /workspace/:workspaceId/projects/:projectId/edit, restricted to project leads, including editable fields for project description, rich-text instructions, custom imagery (single JSON object + schema validation), team members and roles, configuration (lock timeout + review-required), and project actions (reset tasks, close project, permanently delete).
  • Implemented the edit-page flow with per-section dirty-state detection (including rich-text normalization and trimmed comparisons), conditional Save enablement, and unsaved-change protection via both onBeforeRouteLeave and beforeunload using an accessible confirmation dialog.
  • Added project-edit support in the data/API layer and UI navigation:
    • New workspace project API methods: updateWorkspaceProject, closeWorkspaceProject, resetWorkspaceProject, and deleteWorkspaceProject, plus improved normalization (e.g., description/summary, nullable instructions, custom_imagery) and tighter user-role 404 handling.
    • Updated project details page to show an “Edit project” button for leads, and improved HTTP-aware error messaging throughout.
  • Introduced shared infrastructure and UX/accessibility improvements:
    • New components/AppConfirmationDialog.vue with focus restoration, Escape-to-close, Tab focus trapping, busy/disabled states, and spinner primary action.
    • Enhanced dialog/toast text wrapping (overflow-wrap: anywhere, including Toastify toast body layout) to prevent long unbroken messages from overflowing.
    • Improved rich-text editor interactions (prevent toolbar mousedown default, safer model update emitting, avoid re-setting content while focused).
    • Added imagery field validation UI/accessibility on wizard/edit steps (invalid/aria-describedby, role="alert" error messaging, and aria-live validating help).
    • Improved contributor UX with new error+retry state for user search, plus shared pagination via new composables/usePagination (applied to contributors and tasks tabs).
  • Hardened project creation/wizard behavior around custom imagery and persistence:
    • Wizard now validates custom imagery in the “details” step via validateProjectCustomImagery (debounced async + request-id to ignore stale results) and blocks progression/creation on validation failure.
    • Added strict parsing for custom imagery payloads (trims, ignores empty, requires a single non-array JSON object) and sanitizes review instructions HTML before persisting.
    • Improved wizard stored-state hydration/validation (isValidProjectWizardStoredState) and made localStorage persistence safer (debounced writes, try/catch for quota/access failures).
  • Improved Rapid integration for imagery + unsaved edits:
    • RapidManager init/switch now accepts an optional customImagerySource and wires it into Rapid after init/reset; Rapid auth patching was refactored.
    • Task editor navigation is blocked when Rapid has unsaved edits, using the confirmation dialog + route-leave/beforeunload interception.
    • Hash/background handling now injects background parameters based on project.customImagery.
  • Added supporting utilities/types and robustness changes:
    • services/http.ts now provides consistent HTTP error message resolution (JSON/non-JSON parsing, nested detail handling, lock/task-specific messaging).
    • services/index.ts now requires VITE_NEW_API_URL to be set.
    • services/project-wizard.ts switches name availability checks to a dedicated validate-name endpoint (exists boolean).
    • Added util/rapid-imagery.ts conversion from ImagerySource to Rapid imagery source.
    • Added useProjectEditActions (reset/close/delete flows with dialog + toasts + navigation) and useProjectEditMembers (role editing with lead constraint enforcement, optimistic updates, rollback on failure, and confirmation-based removals).

shweta2101 and others added 13 commits July 8, 2026 12:52
Introduce a full-featured Project Edit page (pages/workspace/[id]/projects/[projectId]/edit.vue) that lets project leads edit description/instructions, manage team members (search, add, update roles, remove), change configuration (lock timeout, review requirement) and run project actions (reset, close, delete) with confirmation flows. Add a reusable AppConfirmationDialog component for consistent confirmation UI and keyboard handling. Update RichTextEditor to track last emitted value and avoid re-applying identical editor updates (prevents echo/loop when syncing modelValue). Also include supporting changes to project-related services/types and the projects index view to integrate the new edit functionality and API calls.
Add support for a single custom imagery JSON object throughout the project wizard and project edit/create flows. Introduces parseProjectWizardCustomImagery and validateProjectCustomImagery (new services/project-custom-imagery.ts) with schema-based validation and debounced client-side checks; UI now shows validation state and error messages. Wire custom imagery into payloads and project updates (services/project-wizard-payload.ts, services/projects.ts) and update types accordingly. Add resolveHttpErrorMessage helper to normalize API error messages and replace many ad-hoc error handling sites to surface clearer messages. Minor UX/styling fixes: overflow-wrap for toast/text areas, JSON textarea styling, and change project name validation to use the validate-name endpoint.
Introduce a shared usePagination composable and refactor ContributorsTab and TasksTab to use it (DRY pagination logic, visible pagination items, clamping). Add workspace user error handling and retry support in project wizard components (AssignUsersField, SettingsStep, create page, and useProjectWizardSettings). Harden useProjectWizard persistence: validate stored state, debounce writes with a timer, handle storage errors, and preserve createdProject correctly. Update AppConfirmationDialog class names and prevent closing on Escape when busy. Add unsaved-edits confirmation to task editor and change back navigation to a button to intercept navigation. Improve pages: prevent cancelling while member mutation is in progress and surface load errors from contributors. Service updates: require VITE_NEW_API_URL at startup, sanitize project instructions before payload submission, and refine WorkspaceProjectsClient error handling (return null on 404, rethrow other errors). Misc: small UI/logic tweaks (AOI/details step gating on create, workspace route load error handling).
Pass project.customImagery through to RapidManager by adding a customImagerySource parameter to switchWorkspace, init, and #addCustomImagerySource. Update addCustomImagerySource to accept the passed data and create the imagery source; keep context assignment commented (left as a note). Add async/await and try/catch around manager.init in mountEditor to log initialization failures instead of failing silently.
Resolved the custom imagery handling
Enhance rich text rendering (overflow-x, blockquote and table styles) in RichTextContent.vue. Improve HTTP error extraction in services/http.ts to read body.message/body.error and fallback to plain text bodies. Use resolveHttpErrorMessage in useProjectWizardSettings to show detailed workspace user load errors. Refactor RapidManager to accept an optional customImagerySource, guard against null, add converted imagery sources to the imagery system, adjust init/switchWorkspace flow (auth patching, event binding, and async reset), and remove the example imagery block from util/rapid-imagery.ts.
Add strong typing and validation for custom imagery conversion and usage.

- services/rapid.ts: import ImagerySource type, cast incoming source for conversion, and bail out early if conversion returns null before creating/registering a Rapid.ImagerySource.
- util/rapid-imagery.ts: introduce RapidImagerySource interface, add isExtentWithZoom type guard, change convertToRapidImagerySource signature to accept ImagerySource|null and return RapidImagerySource|null, and compute safe min/max zoom defaults instead of reading raw values.

These changes improve type-safety and prevent creating invalid imagery sources when required fields are missing.
Introduce useProjectEditActions and useProjectEditMembers composables and refactor the project edit page to use them (removing duplicated member/action logic). Improve AppConfirmationDialog accessibility by adding tabindex, generating unique title IDs, restoring focus on close, and implementing a focus trap/Tab handling. Enhance HTTP error parsing to extract detailed JSON messages and existing lock info. Update imagery-related types and Rapid service to use the ImagerySource type and adjust related type aliases. Remove obsolete notes.md.
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fa494e93-a935-4644-8069-6a04c8fb0a43

📥 Commits

Reviewing files that changed from the base of the PR and between b6dcdc0 and f7e9406.

📒 Files selected for processing (3)
  • composables/useProjectEditActions.ts
  • pages/workspace/[id]/projects/[projectId]/edit.vue
  • util/rapid-imagery.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • util/rapid-imagery.ts
  • composables/useProjectEditActions.ts
  • pages/workspace/[id]/projects/[projectId]/edit.vue

📝 Walkthrough

Walkthrough

Adds a project editing page with contributor and lifecycle actions, custom imagery validation and Rapid integration, wizard persistence and error recovery, shared pagination and HTTP error handling, richer text rendering, and confirmation dialogs.

Changes

Project editing and custom imagery

Layer / File(s) Summary
Project and imagery contracts
types/*, services/project*, services/projects.ts, services/rapid.ts, util/rapid-imagery.ts
Adds project update/lifecycle APIs, custom imagery parsing and validation, updated project payload types, and Rapid imagery conversion.
Project edit page and member actions
pages/workspace/.../edit.vue, components/AppConfirmationDialog.vue, composables/useProjectEdit*
Adds project editing sections, save/cancel handling, contributor search and role management, lifecycle confirmations, and focus-managed modal behavior.
Project navigation and Rapid task integration
pages/workspace/.../index.vue, pages/workspace/.../tasks/.../editor.vue, services/rapid.ts
Adds lead-only project editing navigation, custom imagery initialization and switching, error banners, and unsaved-edit confirmation before leaving or skipping tasks.

Project creation wizard

Layer / File(s) Summary
Wizard persistence and payload validation
composables/useProjectWizard.ts, util/project-wizard-storage.ts, services/project-wizard*.ts
Validates restored state, debounces persistence, restores created projects, sanitizes payload content, and uses the name-validation endpoint.
Wizard imagery and workspace-user feedback
pages/workspace/.../create.vue, components/project-wizard/*, services/project-custom-imagery.ts
Adds debounced imagery validation, progression guards, workspace-user retry handling, and accessible validation feedback.
Wizard editor and map stability
components/project-wizard/RichTextEditor.vue, components/project-wizard/AoiGeometryMap.vue
Prevents redundant editor content resets and initializes map sources, interactions, and viewport state on load.

Shared UI and service infrastructure

Layer / File(s) Summary
HTTP error resolution and service configuration
services/http.ts, services/index.ts, pages/workspace/...
Extracts structured HTTP error messages and requires VITE_NEW_API_URL.
Shared pagination implementation
composables/usePagination.ts, components/workspace-project-details/*Tab.vue
Centralizes pagination calculations and page controls for contributor and task lists.
Rich-text rendering and wrapping styles
components/workspace-project-details/RichTextContent.vue, assets/scss/main.scss, components/project-wizard/StatusDialog.vue
Sanitizes rich text during server rendering, styles tables and blockquotes, and wraps long messages.

Estimated code review effort: 5 (Critical) | ~120 minutes

Poem

I’m a rabbit with a page to edit,
Imagery hops through schemas—fit!
Buttons guard the leaving way,
Toasts wrap long words night and day.
Paginated carrots line the view,
And Rapid gets new maps to chew.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.76% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: implementing the Edit Project flow and related UI/service support.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@shweta2101
shweta2101 requested a review from susrisha July 16, 2026 11:14

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@composables/useProjectEditActions.ts`:
- Around line 95-133: Separate persisted mutation success from subsequent
refresh and navigation failures across the affected sites: in
composables/useProjectEditActions.ts lines 95-133, clear the dialog immediately
after close/reset/delete succeeds and handle navigation errors independently; in
services/projects.ts lines 288-297, remove the unused post-close GET or expose
its refresh failure separately; in composables/useProjectEditMembers.ts lines
150-168, 170-198, and 200-232, preserve added, updated, and removed contributor
state after the mutation succeeds even if refresh fails, so refresh errors are
reported separately and do not trigger duplicate requests or role rollback.

In `@composables/useProjectWizard.ts`:
- Around line 26-31: Update isValidStoredState to validate the complete
ProjectWizardStoredState contract before hydration: validate each nested draft
field using the expected field shapes rather than only checking that area,
details, review, and settings are objects, and validate createdProject as either
null or the expected checkpoint shape. Reject missing, invalid, or truthy
malformed checkpoint values while preserving valid persisted states.

In `@pages/workspace/`[id]/projects/[projectId]/edit.vue:
- Around line 5-10: Protect all navigation from unsaved changes, not only custom
controls: in pages/workspace/[id]/projects/[projectId]/edit.vue lines 5-10,
route breadcrumb links through the existing guarded leave flow; in lines
587-610, add route-leave and beforeunload guards driven by isDirty. In
pages/workspace/[id]/projects/[projectId]/tasks/[taskId]/editor.vue lines 43-46,
retain the custom Back handler while ensuring it is not the sole protection; in
lines 378-423, add equivalent route-leave and beforeunload guards driven by
hasActiveEdits.

In `@pages/workspace/`[id]/projects/[projectId]/tasks/[taskId]/editor.vue:
- Line 308: Update mountEditor() and the switchWorkspace() call to handle
promise rejections instead of discarding them: await or catch the
switchWorkspace promise, catch initialization failures from mountEditor(), and
expose a clear actionable page error for either failure so the editor does not
remain blank without user feedback.

In `@pages/workspace/`[id]/projects/create.vue:
- Around line 459-495: Update the imagery validation flow in the watcher and
validateCustomImagery/primary-action path to invalidate pending runs whenever
the input changes, capture and validate the exact input value for each run, and
check the request ID before applying results or navigating. Wrap validation in
exception-safe handling so rejected requests do not escape, and reset
imageryValidating in a finally block for every active validation, including
manual validation.

In `@services/http.ts`:
- Around line 74-77: Remove all newly introduced trailing commas at the
specified sites: the fallbackMessage parameter in services/http.ts#L74-L77; the
maxVisibleButtons parameter, computed call, object property, and array item in
composables/usePagination.ts#L12-L16, `#L19-L21`, `#L29-L37`, and `#L52-L54`; and the
trailing arguments in ContributorsTab.vue#L312-L315, TasksTab.vue#L292-L295, and
RichTextContent.vue#L25-L27. Preserve the repository’s semicolon style in normal
source files.

In `@util/rapid-imagery.ts`:
- Around line 72-82: Update the minZoom calculation in the custom imagery
conversion to use the schema’s default lower bound, or 0, when extent.min_zoom
is missing instead of 12; leave maxZoom and the surrounding zoomExtent
construction unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 07c40186-2453-4137-8c10-296bfc466400

📥 Commits

Reviewing files that changed from the base of the PR and between bc945e3 and 945336c.

📒 Files selected for processing (30)
  • assets/scss/main.scss
  • components/AppConfirmationDialog.vue
  • components/project-wizard/AssignUsersField.vue
  • components/project-wizard/RichTextEditor.vue
  • components/project-wizard/StatusDialog.vue
  • components/project-wizard/steps/ProjectDetailsStep.vue
  • components/project-wizard/steps/SettingsStep.vue
  • components/workspace-project-details/ContributorsTab.vue
  • components/workspace-project-details/RichTextContent.vue
  • components/workspace-project-details/TasksTab.vue
  • composables/usePagination.ts
  • composables/useProjectEditActions.ts
  • composables/useProjectEditMembers.ts
  • composables/useProjectWizard.ts
  • composables/useProjectWizardSettings.ts
  • data/project-wizard-step-config.json
  • pages/workspace/[id]/projects/[projectId]/edit.vue
  • pages/workspace/[id]/projects/[projectId]/index.vue
  • pages/workspace/[id]/projects/[projectId]/tasks/[taskId]/editor.vue
  • pages/workspace/[id]/projects/create.vue
  • services/http.ts
  • services/index.ts
  • services/project-custom-imagery.ts
  • services/project-wizard-payload.ts
  • services/project-wizard.ts
  • services/projects.ts
  • services/rapid.ts
  • types/project-wizard.ts
  • types/projects.ts
  • util/rapid-imagery.ts

Comment thread composables/useProjectEditActions.ts
Comment thread composables/useProjectWizard.ts Outdated
Comment thread pages/workspace/[id]/projects/[projectId]/edit.vue Outdated
Comment thread pages/workspace/[id]/projects/[projectId]/tasks/[taskId]/editor.vue Outdated
Comment thread pages/workspace/[id]/projects/create.vue Outdated
Comment thread services/http.ts
Comment thread util/rapid-imagery.ts
Reformat Vue templates and TypeScript files for consistent styling (line breaks, attribute wrapping, spacing). Add comments indicating sanitized HTML for ReviewStep and RichTextContent. Import sanitizeReviewHtml in project-wizard-payload (remove duplicate import). Remove unused type imports from ContributorsTab and TasksTab, adjust emits typing quote, and make minor whitespace/formatting fixes in usePagination, useProjectWizardSettings, rapid, and rapid-imagery utilities. Primarily non-functional cleanups and documentation annotations.
Multiple fixes and UX improvements across project wizard, project edit, task editor, membership management, and imagery validation:

- Add util/project-wizard-storage.ts and switch useProjectWizard to validate stored wizard state via isValidProjectWizardStoredState.
- AoiGeometryMap: initialize AOI source with createAoiFeatureCollection and call syncSources/syncInteractionState/applyViewport on mount.
- RichTextEditor: prevent mousedown on toolbar buttons and avoid update loops by checking focus/getHTML before applying external updates.
- usePagination and small component files: minor formatting/whitespace fixes.
- useProjectEditActions: reorder toast/navigation to occur after successful server operations, handle navigation failures, and ensure dialog state is cleared correctly.
- useProjectEditMembers: add optimistic updates and robust error handling (refreshAfterPersistedMutation, persistMemberRole), update add/update/remove member flows to keep UI responsive and retry/notify on refresh failures.
- pages/workspace/.../edit.vue and tasks editor: add beforeunload and onBeforeRouteLeave handling for unsaved changes, introduce allowNextRouteLeave/navigateAfterSave, show discard confirmation, and adjust layout scrolling/flex behavior.
- Task editor: improved unsaved-edits dialog integration, editor load error reporting, safer mountEditor error propagation, and beforeunload handling.
- pages/workspace/.../create.vue: rewrite imagery validation flow to use request ids, better debounce handling, centralized validateCustomImagery with error fallback, and helpers to validate the current imagery state before submissions.
- services/projects.ts: closeWorkspaceProject now returns void (no extra GET) and services/http small signature formatting cleanup.
- util/rapid-imagery.ts: change default minZoom fallback from 12 to 0.

Also includes various small UI/CSS tweaks and console error reporting for editor/imagery failures. These changes aim to make state persistence safer, avoid editor update loops, improve member mutation UX, and provide clearer handling of unsaved changes and imagery validation errors.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
util/project-wizard-storage.ts (1)

3-6: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the trailing comma from the import statement.

As per coding guidelines, new code must not include trailing commas after the last item in imports to align with the repository’s lint/style rules.

🧹 Proposed fix
 import type {
   ProjectWizardStepId,
-  ProjectWizardStoredState,
+  ProjectWizardStoredState
 } from '~/types/project-wizard';
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@util/project-wizard-storage.ts` around lines 3 - 6, Update the type-only
import of ProjectWizardStepId and ProjectWizardStoredState to remove the
trailing comma after the final imported item, preserving the existing import
structure.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@util/project-wizard-storage.ts`:
- Around line 3-6: Update the type-only import of ProjectWizardStepId and
ProjectWizardStoredState to remove the trailing comma after the final imported
item, preserving the existing import structure.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 02445a7a-9c3d-4b8e-b310-b9d7736da504

📥 Commits

Reviewing files that changed from the base of the PR and between 945336c and b6dcdc0.

📒 Files selected for processing (24)
  • components/AppConfirmationDialog.vue
  • components/project-wizard/AoiGeometryMap.vue
  • components/project-wizard/AssignUsersField.vue
  • components/project-wizard/RichTextEditor.vue
  • components/project-wizard/steps/ProjectDetailsStep.vue
  • components/project-wizard/steps/ReviewStep.vue
  • components/workspace-project-details/ContributorsTab.vue
  • components/workspace-project-details/RichTextContent.vue
  • components/workspace-project-details/TasksTab.vue
  • composables/usePagination.ts
  • composables/useProjectEditActions.ts
  • composables/useProjectEditMembers.ts
  • composables/useProjectWizard.ts
  • composables/useProjectWizardSettings.ts
  • pages/workspace/[id]/projects/[projectId]/edit.vue
  • pages/workspace/[id]/projects/[projectId]/index.vue
  • pages/workspace/[id]/projects/[projectId]/tasks/[taskId]/editor.vue
  • pages/workspace/[id]/projects/create.vue
  • services/http.ts
  • services/project-wizard-payload.ts
  • services/projects.ts
  • services/rapid.ts
  • util/project-wizard-storage.ts
  • util/rapid-imagery.ts
🚧 Files skipped from review as they are similar to previous changes (18)
  • components/project-wizard/steps/ProjectDetailsStep.vue
  • services/project-wizard-payload.ts
  • composables/usePagination.ts
  • components/workspace-project-details/RichTextContent.vue
  • components/project-wizard/AssignUsersField.vue
  • composables/useProjectEditActions.ts
  • util/rapid-imagery.ts
  • components/workspace-project-details/ContributorsTab.vue
  • components/workspace-project-details/TasksTab.vue
  • components/AppConfirmationDialog.vue
  • pages/workspace/[id]/projects/[projectId]/index.vue
  • services/rapid.ts
  • pages/workspace/[id]/projects/[projectId]/tasks/[taskId]/editor.vue
  • composables/useProjectEditMembers.ts
  • composables/useProjectWizardSettings.ts
  • services/http.ts
  • pages/workspace/[id]/projects/create.vue
  • pages/workspace/[id]/projects/[projectId]/edit.vue

Changes:
- Update action help texts (reset/close) for clearer, consistent wording.
- Shorten project name hint to "Project name cannot be edited".
- Remove some explanatory helper paragraphs to reduce redundancy (detailed instructions, team header, imagery label helper).
- Rename "Custom Imagery" header to "Imagery JSON Definition" and change section label to "Imagery".
- Increase custom imagery textarea rows from 18 to 26 and remove the separate label to favor inline placeholder.
- Reword locked settings message and action preview heading for clarity.
- In rapid-imagery conversion, change default minZoom from 0 to 12 to avoid overly broad low-zoom defaults when extent zoom is unspecified.
@shweta2101
shweta2101 merged commit d1e69c0 into develop Jul 17, 2026
2 checks passed
@shweta2101
shweta2101 deleted the feature-3984-edit-project-tm branch July 17, 2026 12:25
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