diff --git a/ROADMAP.md b/ROADMAP.md index ac2c7ba..6d78af0 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -15,7 +15,7 @@ This document is the living implementation plan. It is updated as phases land. | 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 | 🟡 In progress (read paths done) | +| 3 | Collaboration: issues, PRs, reviews, notifications | ✅ Done (read + write) | | 4 | Code editing: Quick Edit (CodeMirror), VS Code workspace | ⬜ Planned | | 5 | Advanced: Actions, packages, orgs, wiki, releases, admin | ⬜ Planned | @@ -82,24 +82,26 @@ Architectural decisions are recorded in `docs/ARCHITECTURE.md`. - [x] Pull-to-refresh, infinite scroll, skeleton and empty states - [x] Offline read-only cache for previously loaded content (persister) -## Phase 3 — Collaboration (in progress: read paths done) +## Phase 3 — Collaboration (write paths) - [x] Issue list: open/closed, cross-repo (assigned/created/review-requested) and per-repo - [x] Issue search across repositories (`/repos/issues/search`) - [x] Issue detail: body (Markdown), labels, assignees, milestones, comment count -- [ ] Issue comments thread -- [ ] Create/edit issues, comment composer, attachments -- [ ] Filters UI (label, milestone, assignee) and server-side sorting +- [x] Issue comments thread with composer (edit/delete own comments) +- [x] Create/edit issues (title, body, labels, assignees, milestone) + close/reopen - [x] Pull request list (cross-repo review-requested + per-repo) - [x] Pull request detail: branches, labels, stats, reviewers, Markdown body -- [ ] Changed files list with per-file navigation -- [ ] Unified + split diff viewer -- [ ] Inline review comments, approve / request changes -- [ ] Merge (squash/rebase/merge) when authorized -- [ ] CI check statuses from Gitea Actions +- [x] Changed files list with per-file navigation +- [x] Unified diff viewer (native, color-coded) +- [x] Approve / request changes / comment reviews +- [x] Merge (squash / merge commit) +- [x] CI check statuses from Gitea Actions (commit + PR head) - [x] Notifications inbox: read/unread, mark read, mark-all-read, unread badge - [x] Lifecycle-aware notification polling tied to the refresh-interval setting - [x] 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 (planned) diff --git a/docs/FEATURE_PARITY.md b/docs/FEATURE_PARITY.md index 8ecf62e..05adbe9 100644 --- a/docs/FEATURE_PARITY.md +++ b/docs/FEATURE_PARITY.md @@ -55,10 +55,11 @@ roadmap). | Cross-repo issue list | ✅ | `GET /repos/issues/search` | assigned/created/review_requested, `type=issues` | | Repo issue list | ✅ | `GET /repos/{o}/{r}/issues` | open/closed filter | | Issue detail | ✅ | `GET /repos/{o}/{r}/issues/{n}` | Markdown body, labels, assignees, milestone | -| Issue comments | 🟡 | `GET …/issues/{n}/comments` | count shown; thread not yet rendered | -| Create/edit issue | ⬜ | `POST/PATCH` | planned | -| Comment composer | ⬜ | `POST …/comments` | planned | -| Labels/milestones management | ⬜ | various | planned | +| Issue comments | ✅ | `GET/POST …/issues/{n}/comments` | thread + composer; edit/delete own comments | +| Create issue | ✅ | `POST …/issues` | title, body, labels, assignees, milestone | +| Edit issue | ✅ | `PATCH …/issues/{n}` | metadata + close/reopen | +| Labels/milestones management | 🟡 | `GET …/labels`, `GET …/milestones` | read + assign on compose; CRUD not yet | +| Assignees | ✅ | `GET …/collaborators` | select on compose/edit | | Reactions/subscriptions | ⬜ | various | planned | ## Pull requests @@ -68,11 +69,13 @@ roadmap). | Review-requested PR list | ✅ | `GET /repos/issues/search` | `type=pulls`, `review_requested` | | Repo PR list | ✅ | `GET /repos/{o}/{r}/pulls` | open/closed | | PR detail | ✅ | `GET …/pulls/{n}` | title, branches, labels, stats, reviewers | -| Changed files + diff viewer | 🟡 | `GET …/pulls/{n}.diff` | file count only; inline diff viewer planned | -| Inline review comments | ⬜ | `GET …/pulls/{n}/reviews` | planned | -| Approve / request changes | ⬜ | `POST …/reviews` | planned | -| Merge | ⬜ | `POST …/merge` | planned | -| CI checks (Actions) | ⬜ | `GET …/commits/{sha}/status` | planned | +| Changed files list | ✅ | `GET …/pulls/{n}/files` | per-file stats + status | +| Unified diff viewer | ✅ | `GET …/pulls/{n}.diff` | native, color-coded, no WebView | +| PR comments | ✅ | `GET/POST …/issues/{n}/comments` | shared issue thread + composer | +| Review comments (inline) | ⬜ | `GET …/reviews/{id}/comments` | line comments planned | +| Approve / request changes | ✅ | `POST …/pulls/{n}/reviews` | review event + body | +| Merge | ✅ | `POST …/pulls/{n}/merge` | squash / merge commit | +| CI checks (Actions) | ✅ | `GET …/commits/{ref}/status` | combined status on commit + PR | ## Notifications diff --git a/src/components/git/comment-composer.tsx b/src/components/git/comment-composer.tsx new file mode 100644 index 0000000..338013c --- /dev/null +++ b/src/components/git/comment-composer.tsx @@ -0,0 +1,61 @@ +import { useState } from 'react'; +import { StyleSheet, View } from 'react-native'; +import { useTranslation } from 'react-i18next'; + +import { AppText } from '@/components/ui/app-text'; +import { Button } from '@/components/ui/button'; +import { Card } from '@/components/ui/card'; +import { TextArea } from '@/components/ui/text-area'; +import { spacing } from '@/theme/tokens'; + +export interface CommentComposerProps { + onSubmit: (body: string) => Promise | void; + pending?: boolean; + errorMessage?: string | null; +} + +/** Reusable comment box for issue and pull-request threads. */ +export function CommentComposer({ onSubmit, pending = false, errorMessage }: CommentComposerProps) { + const { t } = useTranslation(); + const [text, setText] = useState(''); + + const submit = async () => { + const body = text.trim(); + if (body.length === 0) return; + await onSubmit(body); + setText(''); + }; + + return ( + +