Skip to content

Android and iOS - #20

Merged
j-catania merged 14 commits into
mainfrom
feature/app-and-core
Jul 22, 2026
Merged

Android and iOS#20
j-catania merged 14 commits into
mainfrom
feature/app-and-core

Conversation

@j-catania

@j-catania j-catania commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

Converts the repository into a pnpm workspace monorepo with three packages, so the Tesla Sentry/Saved clip viewer can be shared across a desktop app and a new mobile app.

tesler-core

  • Extracted platform-agnostic pieces previously in tesler-desktop/src/types: Areas, Event, TeslaEventJSON, Part, Videos, plus the formatReason helper (moved out of Clip.tsx).
  • No Electron/DOM/React Native imports — pure types and functions only, so it can be reused by any Tesla clip viewer.
  • Built with tsdown (rolldown-based) → ESM output (dist/index.mjs + .d.mts).
  • Ships its own README.md (usage/API) and CONTRIBUTING.md (contribution rules, publish steps), ready to publish to npm as tesler-core.

tesler-desktop

  • Moved from the repo root into packages/tesler-desktop with no logic changes — same Electron main/preload, same components, same build config (vite.config.ts, electron-builder.json, tsconfig.json all untouched aside from their new location).
  • Now depends on tesler-core (workspace:*) instead of its local src/types/*.
  • pnpm dev, pnpm build, pnpm package, pnpm preview at the repo root still work — they now delegate to the package via pnpm --filter tesler-desktop.
  • scripts/update-docs.mjs (the pnpm version lifecycle hook) updated to read tesler-desktop/package.json and keep its version in sync with the workspace root version.

tesler-app (new)

  • Scaffolded with create-expo-app (TypeScript template).
  • UI built with react-native-paper (Material Design for React Native — MUI itself doesn't run on RN), themed with TesLEr's brand color (#e31937) and MD3 dark theme.
  • Consumes Event / formatReason from tesler-core to render a mock clip list (no native file-system/USB reader yet — that's future work, mirroring tesler-desktop's window.sentinel).
  • metro.config.js configured for the pnpm workspace (watchFolders + symlink resolution) so it correctly resolves the tesler-core workspace dependency.

Root workspace

  • pnpm-workspace.yaml: added packages: - 'packages/*'.
  • Root package.json is now a thin orchestrator (tesler-workspace) with dev/build/package/preview/core:build/app:start/app:ios/app:android scripts delegating via pnpm --filter.
  • AGENTS.md updated to document the new monorepo structure and conventions.

Validation

  • pnpm build (tesler-desktop): tsc + Vite build ✅
  • pnpm --filter tesler-core build: tsdown build ✅
  • tsc --noEmit in tesler-app
  • npx expo export --platform ios: Metro successfully bundles tesler-app (773 modules), confirming the workspace-linked tesler-core package resolves correctly through pnpm symlinks ✅

Not included in this PR

  • Publishing tesler-core to npm (structure is ready; publish is a manual follow-up).

@j-catania j-catania changed the title Main Convert to pnpm workspace: add tesler-core and tesler-app packages Jul 21, 2026
j-catania and others added 6 commits July 21, 2026 20:06
…laCam clips

- Added ClipCard component to render individual clips with thumbnail and delete functionality.
- Introduced ClipDetail component to show detailed view of selected clips, including video playback.
- Integrated Storage Access Framework (SAF) for accessing TeslaCam USB drive on Android.
- Updated App component to manage clip selection and folder picking.
- Enhanced user experience with loading states and error handling.
- Added ClipList component to list available clips and handle permissions.
- Updated app.json to include expo-video plugin.
- Updated package.json to add necessary dependencies for video playback and async storage.
@j-catania j-catania changed the title Convert to pnpm workspace: add tesler-core and tesler-app packages Android and iOS Jul 22, 2026
@j-catania j-catania self-assigned this Jul 22, 2026
@j-catania
j-catania marked this pull request as ready for review July 22, 2026 15:45
@j-catania
j-catania merged commit f3fdc81 into main Jul 22, 2026
6 checks passed
@j-catania
j-catania deleted the feature/app-and-core branch July 22, 2026 15:45
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.

1 participant