You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b76cb43
Browse filesBrowse the repository at this point in the historyBrowse files
docs: record remaining Phase 3 gaps and editor host constraints
Phase 3 has every listed task implemented but is not complete. Note
the open scope gaps: undo and redo are missing, supplemental
highlighting still scans the whole document on the main thread on
every keystroke, and editor highlighting has never been audited
against the Editing Mode syntax list.
Separate those gaps from the remaining verification, and record that
large-note responsiveness is unverified rather than met because no
fixture in the repository uses a large document.
Also record the constraints that apply when Compose hosts AppCompat
widgets, so the theme that caused the editing defect is not
reintroduced.
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
Copy file name to clipboardExpand all lines: docs/architecture/0004-markdown-presentation.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,3 +13,6 @@ The concrete Markwon artifacts will be selected and license-checked when Markdow
13
13
- Rendering and editor highlighting can evolve independently.
14
14
- Highlighting cannot alter source text, cursor position, or selection.
15
15
- Android widget behavior does not enter the portable core.
16
+
- The application theme must stay a `Theme.AppCompat` descendant, because the hosted AppCompat widgets take their default styles from AppCompat theme attributes. A framework-only theme leaves the editor without `focusableInTouchMode` and makes typing impossible.
17
+
- The hosted widgets are styled from two independent sources, so Compose colors must be passed into them explicitly.
18
+
- Editor device tests must inject real key events, because setting widget text directly bypasses input focus.
Copy file name to clipboardExpand all lines: mobile-app-plan.md
+20-4Lines changed: 20 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ The Phase 1 local bootstrap account has been replaced by Nextcloud SSO account o
26
26
27
27
Phase 2 now has an end-to-end read path: Nextcloud SSO account import, account and pull-checkpoint persistence, Notes API capability validation, incremental chunked pulls, transactional Room caching, offline search, account switching, local cache removal, reconnect handling, and Markwon rendering. The implementation and automated coverage are complete; broader real-server interoperability and the configured CI device job must be verified before Phase 2 is marked fully complete.
28
28
29
-
Phase 3 now has an initial end-to-end write path with offline-first note creation and Markdown source editing, asynchronous source highlighting, a formatting toolbar, debounced and lifecycle-aware Room persistence, Nextcloud creation and ETag-protected updates, and stale-response protection through persisted local revisions. Editor focus, cursor, and keyboard input are fixed and covered by device tests. Real-server creation and formatting-triggered updates are verified; real-server title sanitization, conflict behavior, and large-note responsiveness remain to be checked.
29
+
Phase 3 now has an initial end-to-end write path with offline-first note creation and Markdown source editing, asynchronous source highlighting, a formatting toolbar, debounced and lifecycle-aware Room persistence, Nextcloud creation and ETag-protected updates, and stale-response protection through persisted local revisions. Editor focus, cursor, and keyboard input are fixed and covered by device tests. Every listed Phase 3 task is implemented, but the phase is not complete: undo and redo are still missing, supplemental highlighting still runs on the main thread, and large-note responsiveness, real-server title sanitization and conflict behavior, and physical-device input methods are unverified. See the Phase 3 section for the full list.
30
30
31
31
Verified development commands are documented in `README.md`. The baseline verification command is `devenv shell -- just check`; device tests use `just create-avd`, `just start-emulator`, and `just device-test` from inside `devenv shell`.
32
32
@@ -242,6 +242,13 @@ Jetpack Compose can host mature Android text widgets through `AndroidView`:
242
242
- Use an `AppCompatEditText` or equivalent with `MarkwonEditor` for highlighted source editing.
243
243
- Keep these Android-specific adapters behind application interfaces so they do not enter the portable domain layer.
244
244
245
+
Constraints that apply when Compose hosts these widgets:
246
+
247
+
- The application theme must stay a `Theme.AppCompat` descendant. AppCompat widgets resolve their default styles from AppCompat theme attributes such as `editTextStyle`, and a framework-only theme silently leaves the editor without `focusableInTouchMode`, which makes typing impossible. This caused the 2026-09-01 editing defect.
248
+
- Do not rely on the theme alone for interactive behavior. The editor view sets its own focus and input-method flags so it keeps working if the host theme changes.
249
+
- Hosted widgets do not follow the Compose color scheme. Pass the Compose surface colors into them explicitly, otherwise rendered and edited text becomes unreadable in dark mode.
250
+
- Drive editor device tests with real key-event injection. Setting text directly on the widget bypasses input focus and cannot detect a non-typable editor.
251
+
245
252
Do not implement the editor solely with a Compose `BasicTextField` unless profiling and a prototype demonstrate correct cursor, selection, span, input-method, and large-document behavior.
246
253
247
254
Before adding dependencies, verify current versions, licenses, maintenance status, and compatibility with the selected Android Gradle Plugin and Kotlin versions.
@@ -659,11 +666,20 @@ Implemented:
659
666
- Changed formatting actions to replace only the changed range instead of the whole document, preserving undo history, spans, and in-progress input-method composition.
660
667
- Applied the Compose surface text color to the hosted editor and rendered views so note text stays legible in dark mode.
661
668
669
+
Every listed Phase 3 implementation task is complete, but the phase is not finished. The gaps below are open.
670
+
671
+
Known scope gaps:
672
+
673
+
- Undo and redo are not implemented. The editor requirements in this document call for preserving undo and redo, and only the framework `EditText` undo buffer exists. It has no on-screen affordance and is unreachable on a phone without a hardware keyboard. Decide whether Phase 3 ships a toolbar undo/redo control or whether the requirement moves to a later phase.
674
+
- Supplemental QOwnNotes highlighting runs on the main thread. `SupplementalSyntaxWatcher.afterTextChanged` scans the whole document with three regular expressions and rewrites its spans on every keystroke, so its cost grows with note length. The Markwon highlighting beside it is already pre-rendered off the main thread. This is the most likely cause of poor large-note typing latency and should be measured before being redesigned.
675
+
- Editor highlighting has not been audited against the syntax list in the Editing Mode section of this document. Coverage of Setext headings, fence language identifiers, images, and tables in the source view is assumed from the Markwon editor plugins rather than asserted by a test.
676
+
662
677
Remaining verification:
663
678
664
-
- Verify canonical title sanitization and HTTP 412 conflict behavior against supported real Nextcloud and Notes server versions. Real-server `POST` creation and formatting-triggered `PUT` updates are confirmed.
665
-
- Validate large-note editor responsiveness, non-Latin composing text, and additional software keyboards on physical devices.
666
-
- Reconfirm typing on the OPPO CPH2653 running Android 16, where the original defect was reported.
679
+
- Verify canonical title sanitization and HTTP 412 conflict behavior against supported real Nextcloud and Notes server versions. Only MockWebServer coverage exists for these paths. Real-server `POST` creation and formatting-triggered `PUT` updates are confirmed.
680
+
- Measure editor responsiveness on representative large notes. No test or fixture in the repository uses a large document, so the acceptance criterion covering large-note editing is currently unverified rather than met.
681
+
- Validate non-Latin text, input-method composing text, and additional software keyboards on physical devices.
682
+
- Reconfirm typing on the OPPO CPH2653 running Android 16, where the original defect was reported. The fix is verified on an API 36 emulator only.
667
683
668
684
Resolved physical-device issue recorded on 2026-09-01:
0 commit comments