Skip to content

Add “Create Link” Functionality in Links Table Row #318

@mahid797

Description

@mahid797

Goal:
Wire up the existing “Create Link” button in each InfoTable row so that it opens the new Modal V2 LinkCreateModal and properly handles link creation for the selected document.
The button UI is already present; this issue covers hooking it up to the new, centralised modal system, ensuring consistent behaviour with our recent Modal Refactor V2 work.


🎯 Key Deliverables

  • InfoTable Row:

    • Ensure each row’s Create Link button is wired to open LinkCreateModal using the unified ModalProvider context.
    • Pass correct props: documentId (from row) and any default values if required.
  • Modal V2 Registry:

    • Confirm LinkCreateModal is registered in the global modal registry.
    • Use consistent key naming ("link-create").
  • Create Link Logic:

    • On modal submit, create link via existing link service.
    • Refresh local TanStack Query cache (useDocumentLinksQuery or equivalent).
    • Show success toast on create; close modal.
  • Error Handling:

    • Display toast on failure; modal stays open to retry.
  • UX Consistency:

    • Button shows loading state if needed.
    • Disable multiple rapid clicks.
    • Respects existing styles and layout in InfoTable row.

Acceptance Criteria

  • Clicking Create Link on any row opens LinkCreateModal with the right document context.
  • Submitting the modal successfully creates a new link for that document.
  • Newly created link appears instantly in the Links Table without manual refresh.
  • No console errors, stale data, or modal mismatches.
  • Visual & functional QA confirms parity with owner-side “Create Link” modal flow.

🗂 Notes

  • Modal implementation must use the centralised Modal V2 Provider — no local state modals.
  • Uses same validation/schema as other link-creation flows.
  • No styling changes to InfoTable row needed.
  • No new routes or backend work required — reuses existing API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrontendFrontend Related IssueNew FeatureNew feature to be implemented🌱Nice-to-HaveEnhancements, Refactors, UI tweaks, or non-critical optimizations

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions