sync current state

This commit is contained in:
2026-03-01 11:44:10 +01:00
parent e965c4967e
commit f2afe1ab0d
2 changed files with 0 additions and 98 deletions

View File

@@ -1,30 +0,0 @@
# Agent Instructions
These instructions are authoritative for work in this repository.
## Product & UX
- Always adhere to the latest Apple Human Interface Guidelines (iOS).
- Always use native platform components whenever possible.
- On iOS, use native icons from SF Symbols.
- Always implement accessibility best practices (labels, traits, dynamic type, sufficient contrast).
- On iOS, always use default system colors unless explicitly told otherwise (e.g., `.green`).
- Use English as the primary language in the app and design with localization in mind from the start. Implement localization scaffolding for English, German, Spanish, and French.
- Use proper language-specific characters and diacritics in localizations (e.g., German `ä/ö/ü/ß`), never ASCII substitutions like `ae/oe/ue`.
- Date/time conventions are fixed: Monday is the first day of the week. Do not vary by locale.
- Units are always metric; do not use imperial units.
## Privacy & Permissions
- Follow the principle of least privilege. For sensitive access (e.g., contacts), always offer the user a choice between limited and full access when the platform supports it.
## Engineering Standards
- Always use SwiftUI when possible.
- Git commit messages must start with a lower-case letter.
- Always use `tmux` for CLI interactions so sessions can be resumed.
- The calling shell may often be `fish`; run agent command calls in `bash` to avoid shell compatibility issues.
- Keep `CODEX_REPORT.md` updated whenever it makes sense so work can be resumed after context is dropped.
- Always implement tests, especially for fixed bugs, so regressions are not re-introduced.
- When setting up a remote server, the chance is high that you are working on Uberspace. For that, check https://lab.uberspace.de/ and https://manual.uberspace.de/
- Prefer self-contained builds. The app should run on first launch without extra setup when feasible.
- For iOS development, target the latest available iOS version when creating new projects.
- For iOS project setup, use Team ID `NG5W75WE8U`.
- Avoid accounts unless absolutely necessary. Prefer account-less flows; for iOS apps, use iCloud as a backend by default. If we go to web, discuss accounts explicitly.

View File

@@ -1,68 +0,0 @@
# Codex Report — Kontakte
Date: 2026-02-11
## Goal
Copy-cat the default iOS 26 Contacts app UI/behavior, then extend later. Use the new Contacts access API so users can choose full vs limited access.
## Current State
- App uses native SwiftUI + Contacts components: `List`, `NavigationStack`, native `contextMenu`, and `CNContactViewController` for detail/create flows.
- Contacts list is fetched via `CNContactStore` and shown in native sectioned list: My Card, Favorites, All Contacts, with search and add.
- Access flow supports least privilege: **Allow Full Access** (`requestAccess`) and **Select Contacts** (`.contactAccessPicker` for limited access).
- My Card and Favorites are implemented via metadata persisted in contact Notes using a lightweight DSL block.
- Row context menu actions:
- Set / Remove My Card
- Favorite / Remove Favorite
- Delete contact (destructive confirmation)
- Favorites are rendered in the Favorites section with a yellow star marker in rows.
- Localizations exist for `en`, `de`, `es`, `fr` and were normalized to proper language-specific symbols/diacritics.
## Key Implementation Notes
- Notes DSL format:
- `[[kontakte]]`
- `favorite=1`
- `my_card=1`
- `[[/kontakte]]`
- DSL is merged into Notes while preserving user text.
- If notes key access is not allowed, app falls back to note-less contact fetch and surfaces a localized warning for metadata actions.
- `CNErrorDomain` code `102` (`Unauthorized Keys` for `note`) handling was hardened further:
- contact list fetch no longer requests `note` at all
- `supportsMetadataDSL` defaults to disabled to prevent repeated note-key warnings
- contacts remain functional without metadata DSL editing
- Contact fetch runs off-main thread and updates UI on main.
- Unused high-privilege capabilities were removed:
- `UIBackgroundModes` remote-notification removed from `Info.plist`
- push/iCloud/CloudKit entitlements removed from app entitlements
## Files Added/Updated
- `Kontakte/ContactMetadataDSL.swift` (new)
- `Kontakte/ContactsViewModel.swift`
- `Kontakte/ContactsAccessView.swift`
- `Kontakte/ListsView.swift`
- `Kontakte/ContactRowView.swift`
- `Kontakte/ContactDetailView.swift`
- `Kontakte/ContentView.swift`
- `Kontakte/Info.plist`
- `Kontakte/Kontakte.entitlements`
- `Kontakte.xcodeproj/project.pbxproj` (known regions include `de/es/fr`)
- `Kontakte/en.lproj/Localizable.strings`
- `Kontakte/de.lproj/Localizable.strings`
- `Kontakte/es.lproj/Localizable.strings`
- `Kontakte/fr.lproj/Localizable.strings`
- `KontakteTests/KontakteTests.swift` (regression tests for DSL parse/update behavior)
- `Kontakte/Item.swift` (deleted unused template model)
## Known Issues / Caveats
- System logs may still include framework-level remote service noise on device/simulator (not always app defects).
- Some devices/profiles may restrict note-key access; in that case metadata actions are disabled gracefully.
- Native `contextMenu` row highlight persistence can still be briefly visible depending on OS behavior.
- Lists/Groups parity and alphabetical index are still incomplete vs Apple Contacts.
- System-level "helper app"/remote object warnings can still appear in console even when app behavior is correct.
## Next Steps
1. Add tests for `ContactsViewModel` metadata transitions and deletion paths (mocked store abstraction).
2. Improve parity for Lists/Groups and alphabetical index behavior.
3. Add UI tests for first-run permission flows (full, limited, denied) with deterministic test fixtures.
## Git
- Worktree currently contains uncommitted local changes from iterative implementation and guideline-alignment passes.