Skip to content

[BUG]: Global Search Modal does not index Cover Letters and routes to wrong paths #79

@Gautam25Raj

Description

@Gautam25Raj

Affected Apps / Packages

Studio (apps/studio)

Description

The global search shortcut (Ctrl + K) only searches through resumes, leaving out Cover Letters entirely. Furthermore, selection routing in StudioShell.tsx is hardcoded to /editor/resume/${id}, which causes navigation errors when non-resume document types are selected.

Steps to Reproduce

  1. Press Ctrl + K to open the search modal.
  2. Search for an existing Cover Letter; notice it does not appear in the results.
  3. Observe that selecting a search item redirects to /editor/resume/[id] unconditionally.

Expected Behavior

The search modal should query and index both resumes and cover letters, and routing should dynamically dispatch to /editor/resume/[id] or /editor/cover_letter/[id] based on the document type.

Environment Information

  • OS: Windows
  • Browser: Chrome / Edge
  • Node.js: 20.x

Relevant Logs

No response

Proposed Fix / Suggestions

  1. Search Integration: Refactor WorkspaceSearchModal to retrieve documents using getDocumentLibrarySnapshot() (which unifies Resumes and Cover Letters):
    // In apps/studio/components/dashboard/WorkspaceSearchModal.tsx:
    const docs = getDocumentLibrarySnapshot();
  2. Dynamic Routing: Pass document type back in the onOpenDocument callback in StudioShell.tsx and route conditionally:
    onOpenDocument={(id, type) => router.push(`/editor/${type.toLowerCase()}/${id}`)}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingui/uxDesign or user experience improvements

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions