Start button to open spectora

Objective

  • Show a Start button in job details on the Attik mobile app that, when tapped, sends the inspector to that job in the Spectora mobile app (e.g. open the inspection in Spectora so they can write the report).
  • Make Attik the primary place for inspection info (schedule, contacts, activity, etc.) and Spectora the place to write reports, with a clear, one-tap path from Attik to Spectora to support that workflow.

Background

  • Inspectors need to move from "view job in Attik" to "do the inspection in Spectora" without hunting for the job again. A visible Start button in job details that opens the same job in the Spectora app reduces friction and reinforces using Attik for context and Spectora for report writing.
  • On the web, the workorder already links to Spectora via https://app.spectora.com/inspection/${inspection.slug}/edit (e.g. in WorkorderActionsDropdown). The mobile app needs an equivalent that opens the Spectora mobile app to the same inspection when possible.
  • The inspection's slug is the Spectora-side identifier; the backend stores it and exposes it with inspection data, so the mobile app can use it to build the link.

Scope

  • Mobile (attik-mobile)
    The app lives in the workspace under attik-mobile (app root: attik-mobile/attik-mobile). The job details screen is app/inspection/[id].tsx (InspectionDetailsScreen). Inspection data is loaded via hooks/useInspectionDetails.ts, which fetches inspection/${inspectionId} with populate for charges, services, people, reports, events; the response type InspectionPopulatedWithServices in types/index.ts already includes slug (line 90). A "Start Inspection" button already exists in the footer of this screen (BlurView footer with startButton / startButtonText styles, lines 465–472) but the TouchableOpacity has no onPress handler—it is visible but does nothing. In scope: wire that button so that when tapped it opens this job in Spectora using inspection.slug, e.g. https://app.spectora.com/inspection/${inspection.slug}/edit via Linking.openURL (or a Spectora mobile deep link / universal link if available and preferred). If slug is missing for some inspections, disable or hide the button and optionally surface a short message. How to open Spectora on mobile (universal link vs custom scheme vs fallback to browser) is a decision for the developer using Spectora’s behavior and docs (e.g. Quick Start Guide: Mobile App). No other UI change is required; the Start button placement and styling are already in place.
  • Backend (attik-backend)
    Inspection documents include a slug (see attik-backend/src/models/inspectionSchema.ts); it is synced from Spectora (e.g. src/routes/webhooks/spectora/syncInspection.ts) and returned by inspection APIs. The mobile app’s useInspectionDetails calls inspection/${id}; that endpoint should already return the inspection document including slug. No change is required for when or how slug is stored; only confirm that the response shape used by the mobile job-details screen exposes slug.
  • Frontend (attik-frontend)
    The web workorder uses https://app.spectora.com/inspection/${inspection.slug}/edit in attik-frontend/src/app/tools/inspections/[id]/components/WorkorderActionsDropdown.tsx ("Open Spectora Job"). The mobile app may use the same URL as a universal link (if Spectora opens it in-app on mobile) or a different scheme; the developer should verify against Spectora’s behavior. No web UI change is required for this task.

References

  • Web "Open Spectora Job" link: attik-frontend/src/app/tools/inspections/[id]/components/WorkorderActionsDropdown.tsx (handleOpenSpectoraJob, https://app.spectora.com/inspection/${inspection.slug}/edit)
  • Inspection slug in backend: attik-backend/src/models/inspectionSchema.ts; sync from Spectora in src/routes/webhooks/spectora/syncInspection.ts
  • Mobile job details screen: attik-mobile/app/inspection/[id].tsx (InspectionDetailsScreen, footer Start button); data: attik-mobile/hooks/useInspectionDetails.ts; type with slug: attik-mobile/types/index.ts (InspectionPopulatedWithServices.slug)
  • Spectora Quick Start Guide: Mobile App (for app behavior and any documented linking)

Please authenticate to join the conversation.

Upvoters
Status

Canceled

Board
🏠

Main App

Date

4 months ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.