forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 1
Add Openpad mobile app #332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gergesh
wants to merge
1
commit into
Latitudes-Dev:integration
Choose a base branch
from
gergesh:add-openpad
base: integration
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files | ||
|
|
||
| # dependencies | ||
| node_modules/ | ||
|
|
||
| # Expo | ||
| .expo/ | ||
| dist/ | ||
| web-build/ | ||
| expo-env.d.ts | ||
|
|
||
| # Native | ||
| .kotlin/ | ||
| *.orig.* | ||
| *.jks | ||
| *.p8 | ||
| *.p12 | ||
| *.key | ||
| *.mobileprovision | ||
|
|
||
| # Metro | ||
| .metro-health-check* | ||
|
|
||
| # debug | ||
| npm-debug.* | ||
| yarn-debug.* | ||
| yarn-error.* | ||
|
|
||
| # macOS | ||
| .DS_Store | ||
| *.pem | ||
|
|
||
| # local env files | ||
| .env*.local | ||
|
|
||
| # typescript | ||
| *.tsbuildinfo | ||
|
|
||
| # generated native folders | ||
| /ios | ||
| /android |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,146 @@ | ||
| # OpenPad | ||
|
|
||
| A mobile client for [OpenCode](https://opencode.ai) - the AI coding assistant. Built with Expo and React Native. | ||
|
|
||
| ## Features | ||
|
|
||
| - Connect to any OpenCode server | ||
| - View and manage chat sessions | ||
| - Send messages and receive AI responses in real-time | ||
| - View tool usage (file reads, edits, bash commands, etc.) | ||
| - Expandable tool blocks with input/output details | ||
| - Image attachment support | ||
| - Dark/light theme support | ||
| - Live polling for real-time updates | ||
|
|
||
| ## Screenshots | ||
|
|
||
| *Coming soon* | ||
|
|
||
| ## Requirements | ||
|
|
||
| - Bun 1.3+ | ||
| - iOS Simulator (Mac) or Android Emulator, or physical device with Expo Go | ||
|
|
||
| ## Installation | ||
|
|
||
| This package is part of the shuvcode monorepo. From the repository root: | ||
|
|
||
| ```bash | ||
| bun install | ||
| ``` | ||
|
|
||
| Start the development server: | ||
|
|
||
| ```bash | ||
| bun run --cwd packages/mobile start | ||
| ``` | ||
|
|
||
| 4. Run on your device: | ||
| - **iOS Simulator**: Press `i` in the terminal | ||
| - **Android Emulator**: Press `a` in the terminal | ||
| - **Physical Device**: Scan the QR code with Expo Go app | ||
|
|
||
| ## Connecting to OpenCode | ||
|
|
||
| 1. Make sure you have an OpenCode server running (default: `http://localhost:9034`) | ||
| 2. If running on a physical device, use your machine's local IP address instead of `localhost` | ||
| 3. Enter the server URL in the connect screen and tap "Connect" | ||
|
|
||
| ## Project Structure | ||
|
|
||
| ``` | ||
| openpad/ | ||
| ├── App.tsx # Main app entry point with navigation | ||
| ├── src/ | ||
| │ ├── components/ # Reusable UI components | ||
| │ │ ├── GlassCard.tsx # Glass morphism card component | ||
| │ │ ├── Icon.tsx # Icon wrapper for lucide-react-native | ||
| │ │ └── Markdown.tsx # Markdown renderer for messages | ||
| │ ├── hooks/ # Custom React hooks | ||
| │ │ ├── useOpenCode.ts # OpenCode SDK hook (legacy) | ||
| │ │ └── useTheme.ts # Theme hook for dark/light mode | ||
| │ ├── providers/ # Context providers | ||
| │ │ └── OpenCodeProvider.tsx # OpenCode client & state management | ||
| │ ├── screens/ # App screens | ||
| │ │ ├── ChatScreen.tsx # Chat conversation view | ||
| │ │ ├── ConnectScreen.tsx # Server connection screen | ||
| │ │ ├── SessionsScreen.tsx # Sessions list | ||
| │ │ └── SettingsScreen.tsx # App settings | ||
| │ └── theme/ # Theme configuration | ||
| │ └── index.ts # Colors, typography, spacing | ||
| ├── assets/ # App icons and images | ||
| └── package.json | ||
| ``` | ||
|
|
||
| ## Tech Stack | ||
|
|
||
| - **Expo SDK 54** - React Native development platform | ||
| - **React Navigation** - Native stack navigation | ||
| - **@opencode-ai/sdk** - OpenCode API client | ||
| - **lucide-react-native** - Icon library | ||
| - **expo-blur** - Blur effects for iOS | ||
| - **react-native-markdown-display** - Markdown rendering | ||
|
|
||
| ## Contributing | ||
|
|
||
| We welcome contributions! Here's how you can help: | ||
|
|
||
| ### Getting Started | ||
|
|
||
| 1. Fork the repository | ||
| 2. Create a feature branch: `git checkout -b feature/my-feature` | ||
| 3. Make your changes | ||
| 4. Run TypeScript check: `bun run typecheck` | ||
| 5. Commit your changes: `git commit -m "feat: Add my feature"` | ||
| 6. Push to your fork: `git push origin feature/my-feature` | ||
| 7. Open a Pull Request | ||
|
|
||
| ### Commit Convention | ||
|
|
||
| We follow [Conventional Commits](https://www.conventionalcommits.org/): | ||
|
|
||
| - `feat:` - New features | ||
| - `fix:` - Bug fixes | ||
| - `docs:` - Documentation changes | ||
| - `style:` - Code style changes (formatting, etc.) | ||
| - `refactor:` - Code refactoring | ||
| - `test:` - Adding or updating tests | ||
| - `chore:` - Maintenance tasks | ||
|
|
||
| ### Code Style | ||
|
|
||
| - Use TypeScript for all new code | ||
| - Follow existing patterns in the codebase | ||
| - Use functional components with hooks | ||
| - Keep components small and focused | ||
| - Use the theme system for colors and spacing | ||
|
|
||
| ### Areas for Contribution | ||
|
|
||
| - UI/UX improvements | ||
| - New features (voice input, image upload, etc.) | ||
| - Performance optimizations | ||
| - Bug fixes | ||
| - Documentation improvements | ||
| - Tests | ||
|
|
||
| ### Reporting Issues | ||
|
|
||
| Found a bug or have a feature request? [Open an issue](https://github.com/R44VC0RP/openpad/issues) with: | ||
|
|
||
| - Clear description of the problem or feature | ||
| - Steps to reproduce (for bugs) | ||
| - Expected vs actual behavior | ||
| - Screenshots if applicable | ||
| - Device/OS information | ||
|
|
||
| ## License | ||
|
|
||
| MIT | ||
|
|
||
| ## Acknowledgments | ||
|
|
||
| - [OpenCode](https://opencode.ai) - The AI coding assistant this app connects to | ||
| - [Expo](https://expo.dev) - React Native development platform | ||
| - [Lucide](https://lucide.dev) - Beautiful icons |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| { | ||
| "expo": { | ||
| "name": "OpenPad", | ||
| "slug": "openpad", | ||
| "version": "1.0.0", | ||
| "scheme": "openpad", | ||
| "orientation": "default", | ||
| "icon": "./assets/icon.png", | ||
| "userInterfaceStyle": "automatic", | ||
| "newArchEnabled": true, | ||
| "splash": { | ||
| "image": "./assets/splash-icon.png", | ||
| "resizeMode": "contain", | ||
| "backgroundColor": "#ffffff" | ||
| }, | ||
| "ios": { | ||
| "supportsTablet": true, | ||
| "bundleIdentifier": "com.openpad.app" | ||
| }, | ||
| "android": { | ||
| "package": "com.openpad.app", | ||
| "softwareKeyboardLayoutMode": "resize", | ||
| "adaptiveIcon": { | ||
| "foregroundImage": "./assets/adaptive-icon.png", | ||
| "backgroundColor": "#131010" | ||
| }, | ||
| "edgeToEdgeEnabled": true, | ||
| "predictiveBackGestureEnabled": false | ||
| }, | ||
| "web": { | ||
| "favicon": "./assets/favicon.png", | ||
| "bundler": "metro" | ||
| }, | ||
| "plugins": [ | ||
| "expo-router", | ||
| [ | ||
| "expo-image-picker", | ||
| { | ||
| "photosPermission": "Allow OpenPad to access your photos so you can attach images to chats.", | ||
| "cameraPermission": "Allow OpenPad to use your camera so you can capture images to attach to chats." | ||
| } | ||
| ] | ||
| ] | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleting keys from message store creates orphaned references - should check if message list is empty before deleting
Prompt To Fix With AI