- portable UTF-8 base64 helpers (Hermes-safe), used for file round-trips - endpoints: updateFileContents, createFileContents, createPull - hooks: useCommitFile (invalidates repo cache), useCreatePull - FileEdit screen: native monospace editor, dirty/discard, branch picker, commit-to-new-branch, protected-branch handling, post-commit PR creation; stale-SHA 409 surfaces as a conflict message - settings: editor URL template; repo overview 'Open in editor' (no token) - tests: base64 round-trips (accents/emoji), editor URL expansion
7.6 KiB
7.6 KiB
Gitea Native — Roadmap
Unofficial, open-source Gitea client for iOS and Android built with React Native (Expo). This document is the living implementation plan. It is updated as phases land.
Unofficial project. Gitea Native is not affiliated with, endorsed by, or connected to the Gitea project or Codeberg. Gitea is a trademark of its respective owners.
Status overview
| Phase | Scope | Status |
|---|---|---|
| 0 | Project initialization, tooling, docs | ✅ Done |
| 1 | Foundation: design system, auth, multi-account, biometrics | ✅ Done |
| 2 | Core Git experience: home, repos, browsing, commits | ✅ Done |
| 3 | Collaboration: issues, PRs, reviews, notifications | ✅ Done (read + write) |
| 4 | Code editing: Quick Edit, commit flow, editor workspace | ✅ Done (native editor) |
| 5 | Advanced: Actions, packages, orgs, wiki, releases, admin | ⬜ Planned |
Detailed acceptance criteria per phase are in docs/FEATURE_PARITY.md.
Architectural decisions are recorded in docs/ARCHITECTURE.md.
Phase 0 — Foundation scaffolding
- Initialize Expo (SDK 57) app with TypeScript strict mode
- React Navigation structure (native stack + bottom tabs, typed param lists)
- i18next + expo-localization (English & Dutch, system detection, manual override)
- ESLint + Prettier configuration
- Jest (jest-expo) test setup
- Documentation: README, ARCHITECTURE, SECURITY, FEATURE_PARITY, ROADMAP
Phase 1 — Foundation
- Centralized, typed design system (tokens, semantic colors, typography, spacing)
- Light/dark/system theme with persisted preference
- Reusable UI kit (Button, Card, Input, Skeleton, EmptyState, ErrorState, …)
- Typed Gitea REST API client (endpoint-focused, generated-style types)
- Centralized error handling + API error normalization
- Instance URL normalization and validation (HTTPS enforcement)
- Personal Access Token authentication flow with server-side validation
- Secure credential storage (Expo SecureStore / Keystore / Keychain)
- Account registry: multiple instances, multiple accounts per instance
- Account switching without re-authentication
- Account removal + cache purge on removal
- Account-scoped TanStack Query keys (no cross-account cache leaks)
- Biometric app lock (Face ID / Touch ID / Android biometrics), configurable
- App-switcher snapshot redaction while locked
- Graceful handling of expired/invalid/revoked tokens (401 → re-auth)
- Unit tests: URL normalization, token storage, account store, query keys, API client
Phase 1 exit criteria (milestone)
- App launches in Expo development builds (iOS + Android via
expo start) - Light and dark mode work
- Connect to a Gitea instance with a PAT
- Credentials persist securely across restarts
- Multiple instances and multiple accounts per instance can be registered
- Account switching works, data isolated per account
- Biometric lock works on supported devices
- TypeScript + ESLint checks pass
- No secrets in logs or non-secure storage
Device-specific criteria (biometric prompt on real hardware, iOS build) are verified with a development build; see "Known limitations" in the README for what was verified where.
Phase 2 — Core Git experience
- Home dashboard: account header, recent repos, assigned issues, activity, shortcuts
- Repository list: search, sort, visibility filters, star filter
- Starred repositories list
- Repository details (metadata, stars/forks/watches, topics)
- File browser with directory navigation and breadcrumbs
- File viewer (text, image, binary fallback, large-file warning)
- README rendering (Markdown)
- Branch selector (branches + tags)
- Commit history (paginated)
- Commit details with file diffs
- Pull-to-refresh, infinite scroll, skeleton and empty states
- Offline read-only cache for previously loaded content (persister)
Phase 3 — Collaboration (write paths)
- Issue list: open/closed, cross-repo (assigned/created/review-requested) and per-repo
- Issue search across repositories (
/repos/issues/search) - Issue detail: body (Markdown), labels, assignees, milestones, comment count
- Issue comments thread with composer (edit/delete own comments)
- Create/edit issues (title, body, labels, assignees, milestone) + close/reopen
- Pull request list (cross-repo review-requested + per-repo)
- Pull request detail: branches, labels, stats, reviewers, Markdown body
- Changed files list with per-file navigation
- Unified diff viewer (native, color-coded)
- Approve / request changes / comment reviews
- Merge (squash / merge commit)
- CI check statuses from Gitea Actions (commit + PR head)
- Notifications inbox: read/unread, mark read, mark-all-read, unread badge
- Lifecycle-aware notification polling tied to the refresh-interval setting
- Notification subject-URL parsing → issue/PR/commit/repo navigation
- Inline (line-level) review comments
- Server-side filter UI (label, milestone, assignee) and sorting
- Reactions/subscriptions
Phase 4 — Code editing
- Quick Edit: in-app editor over the file contents (native, monospace)
- Commit through the Contents API (base64 content + blob SHA)
- Branch selection and commit to a new branch (
new_branch) - Protected-branch awareness (force a new branch when direct push is blocked)
- Optional "create pull request" right after committing to a new branch
- Stale-SHA (409) conflict handling with a clear message
- Unsaved-changes detection + discard
- Per-instance editor/IDE URL template ("Open in editor"), system-browser/app fallback
- IDE auth stays separate from Gitea API auth (no token in the URL)
- CodeMirror 6 editor in a WebView (syntax highlighting, search/replace)
- Line-level diff preview before committing
Phase 5 — Advanced features (planned)
- Repository create/edit/delete, settings, collaborators, webhooks, deploy keys
- Protected branches, releases, assets, forks
- Wiki, projects, organizations, teams, permissions
- Gitea Actions: workflows, runs, jobs, logs, artifacts, reruns
- Package registries
- User settings: SSH/GPG keys, tokens, profile
- Administration screens where instance permissions allow
- Instance capability service (version, endpoint probing, tri-state: supported / unsupported / disabled / unauthorized / unknown) + graceful degradation
- Browser fallback for API-unavailable features (explicit, never silent)
Cross-cutting work (continuous)
- Performance: fast cold start, virtualized lists, image caching, no needless refetches, large-file/diff warnings with safe fallbacks.
- Accessibility: 44pt touch targets, VoiceOver/TalkBack labels, dynamic text sizing, reduced-motion support.
- Testing: unit tests for core logic, component tests for key flows, mocked Gitea API fixtures (never real credentials), integration tests for multi-account behavior.
- Quality gates:
npm run typecheck,npm run lint,npm testmust pass before merge. - Docs: feature parity matrix, security notes, and limitation disclosures kept current.
Definition of done for any feature
- Real implementation (no placeholders for auth, storage, or data fetching).
- Loading, empty, and error states handled.
- Account-scoped cache keys; no cross-account leakage.
- Types added/updated;
typecheckandlintpass. - Tests for non-trivial business logic.
- Feature parity matrix updated (API availability, permissions, min Gitea version, status).