Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 46 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,52 @@
All notable changes to Notchest are documented here. The format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## [Unreleased]

### Added (toward 0.7)

- Opt-in system notifications via UNUserNotificationCenter for the app's own
events: focus-session completion, new files in Downloads, connected drives,
and stock alerts. The toggle lives in Settings; authorization is requested
only when enabled; wording follows the interface language through
ServiceText; island toasts and the activity feed work independently. Checks
grow from 36 to 37 (single-language wording plus toggle persistence). The
on-screen notification appears after the macOS notification permission is
granted on first enable.
## [0.7.0] — 2026-11-03

### Added

- Opt-in system notifications via UNUserNotificationCenter for the app's own events: focus completion, new files in Downloads, connected drives, and stock alerts. Opt-in from Settings; authorization is requested only when enabled; wording follows the interface language.
- First-run connection checks and Developer/Focus/Everyday presets, with
persistent, reorderable home cards and a background-transparency control.
- Native clear `NSGlassEffectView` on macOS 26+, preserving the notch outline
and providing a behind-window material fallback on older macOS versions.
- Side-by-side local Codex/Claude summaries and optional 80%/95% usage alerts.
- Opt-in native agent hooks for task states, with private configuration
backups and removal, metadata-only local delivery and no approval decisions.
- Opt-in GitHub Actions tracking for the selected project, plus local command
start/exit activities that preserve the active tab.
- Manual and opt-in six-hour stable-release checks with official download-page
links. Developer ID, notarization and unattended installation are deferred
until the owner prepares Apple Developer membership.
- Integration instructions and a validation matrix distinguishing automated,
native UI, real-account and pending hardware coverage.

### Changed

- The collapsed island now shares the same transparent-glass surface as the
expanded island instead of rendering as a solid black block, with a
slightly stronger top scrim so status text stays readable; the
reduce-transparency and increased-contrast fallbacks are unchanged.

### Fixed

- Bound temporary Foundation log-read buffers between chunks; a local large-log
sample reduced peak sampled RSS from 535.92 to 103.28 MiB after warm-up.

- Refresh local AI usage every five seconds in common run-loop modes, on
returning to the usage view, and after wake. Cancel outdated provider/folder
reads so their results cannot overwrite the current selection.
- Add opt-in automatic Codex account-limit refresh every minute, independently
of local tracking. Retry failed connections with bounded backoff and keep
the last successful snapshot visibly marked as stale.
- Read appended JSONL records incrementally, retry unfinished records, and
rebuild the baseline after log truncation, replacement, or a day change.
Keep cached numeric data during transient read failures; bound individual
records to 8 MiB and disclose skipped data as a partial scan.
- Show the last local scan and recorded activity separately from the account
fetch time. Keep connection errors in the current interface language.
- Update the compact island from fresh live limits and hide expired or stale
percentages instead of continuing to show an old local snapshot.

### Documentation

Expand Down
287 changes: 285 additions & 2 deletions Checks/RunChecks.swift

Large diffs are not rendered by default.

88 changes: 88 additions & 0 deletions Docs/INTEGRATIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Set up your Notchest workspace

These features are in the development build after 0.6.0. The published 0.6.0
DMG does not contain them yet. English is the default; Arabic is optional.

## First launch and your overview

First launch offers Developer, Focus and Everyday presets. Each selects four
home cards. Settings lets you show, hide and reorder individual cards, reopen
setup, choose log/project folders, and adjust background transparency.
At least one home card remains visible. Existing notes and island dimensions
are preserved. Reduce Transparency and Increase Contrast override the glass
appearance for readability.

## AI usage and limits

Local Codex and Claude Code summaries appear together. Each log directory can
be selected independently. Scans run every five seconds; their results depend
on the provider writing usage records. Enable recurring Codex account limits
to query the signed-in CLI every minute. Local tracking and account access
remain independent. No inference request is made to read limits.

Optional alerts appear inside Notchest at 80% and 95% usage. A threshold is
reported once per observed reset window. Expired snapshots do not generate
alerts. The app does not invent account limits for Claude or other providers.
Tokens from local logs are not a financial bill or subscription balance.

## Agent task states

1. Move the application to its intended permanent location first, normally
Applications. Hook commands point to its bundled `NotchestCommand` helper.
2. Open Developer > Activity and enable Local API. It listens on loopback
only, uses a rotating token, and remains off on the next app launch.
3. Choose Codex or Claude Code > Install integration. The app shows the scope
before changing configuration and saves an owner-readable local backup.
4. Restart the coding tool. Codex requires review and trust of new hooks in
`/hooks` or Settings > Hooks. Complete that review inside Codex yourself.
Use a tool version that supports lifecycle hooks; older versions may need
upgrading. Managed policies can prevent hooks from running.
5. Start a task. Notchest displays Working, Needs attention, Turn completed,
or Stopped, using the task-state events it receives. Return to the original
coding tool to review and approve requests.

Codex configuration: `CODEX_HOME/hooks.json`, otherwise `~/.codex/hooks.json`.
Claude configuration: `CLAUDE_CONFIG_DIR/settings.json`, otherwise
`~/.claude/settings.json`. Existing hooks and other settings are preserved.
Remove integration removes only the Notchest hook entries and keeps a backup.
Reinstall the integration after moving/renaming the app bundle.

The helper discards prompts, tool arguments, answers and transcript paths. It
posts only provider, hashed session identity, project basename and event state
on this Mac. It always prints empty JSON and never returns an approval,
rejection or continuation decision. This is an observer, not a remote-control
interface. A hook `Stop` describes a turn-stop event; it does not prove that
all tests passed. Build results come from explicit command exits or GitHub
workflow results. If the app is unavailable the helper exits without blocking
the coding tool.

The API token is stored only while enabled in an owner-readable runtime file
under `~/Library/Application Support/Notchest/Runtime`. It is removed on
normal shutdown/disable and replaced with a new token next time.

References: [Codex hooks](https://learn.chatgpt.com/docs/hooks),
[Claude Code hooks](https://code.claude.com/docs/en/hooks).

## Project builds and tests

Choose a local Git repository, sign in with GitHub CLI (`gh auth login`), and
enable GitHub Actions in Developer > Activity. The app checks up to eight
recent workflow runs every minute, shows four in the card, and opens their
GitHub results on click. State changes produce local activities. The initial
scan does not announce historical completed runs. Local command runs also
report start/exit status without changing the active tab on completion.

This reads workflow status; it does not execute or modify repository code.
See [GitHub CLI run list](https://cli.github.com/manual/gh_run_list).

## Releases and Apple signing

Settings > Updates can check the repository's latest stable release manually,
or every six hours after you opt in. It opens the official release download
page. Installation remains manual.

Developer ID signing, Apple notarization and unattended installation are
**deferred at the project owner's request** until an Apple Developer account
is ready. Development packaging keeps the existing local ad-hoc signature;
no Apple credentials, paid membership, notarization submission or new
security exception is requested by this work.
28 changes: 28 additions & 0 deletions Docs/VALIDATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Development validation matrix — 2026-11-02

Scope: workspace/onboarding, transparent native glass, agent activity,
project tracking, AI summaries and release checks after 0.6.0. This is a
record of evidence, not a claim that every supported Mac has been tested.

| Scenario | Evidence/status |
| --- | --- |
| Core correctness | 52 project checks passed locally |
| Preference migration | Setup completion, home order, transparency and dimensions survive model relaunch |
| AI lifecycle | Append/incomplete records, log replacement/day rollover, provider/folder races, retry backoff, cancellation and stale compact limits covered |
| AI alerts | Once per 80%/95% threshold and reset window; expired data ignored |
| Hooks/configuration | Metadata filtering, private backups, existing settings preservation, idempotent install, removal and invalid-file rejection covered in temporary directories |
| Project results | Queued/running/null conclusion and failed runs decoded; unsafe links excluded; actual GitHub runs displayed in the native UI |
| Release metadata | Numeric versions, stable-only results, official repository URLs covered |
| Website | Existing 39-feature gallery remains the released UI baseline; new screenshots are development previews |
| Native UI English/Arabic, glass and preference controls | Passed on the local Mac: English/Arabic setup, presets, card reordering, both provider summaries, glass slider and live release checks |
| Native helper to loopback API | Passed: synthetic PermissionRequest → working → Stop through the packaged helper; empty JSON replies; runtime token removed on disable |
| Whole-app performance | 60-second warm/collapsed sample: 0.12% CPU, 103.28 MiB peak RSS after bounding temporary scan buffers; see PERFORMANCE.md |
| Multiple physical displays, hot-plug and mixed scaling | Pending access to additional displays; sizing geometry has automated coverage |
| Intel and macOS 13–25 material fallback | Pending hardware/OS testing; build targets macOS 13 and guards newer APIs |
| macOS 26 native glass | API is availability-guarded; CI builds against the macOS 26 SDK |
| Real sleep/wake, prolonged battery use and full-screen combinations | Pending device soak testing; wake handling and window policy remain in source |
| Apple Developer ID/notarization and unattended installation | Deferred by owner |

Before a broad release, exercise the pending hardware cases and repeat the
performance measurement with real provider logs. No claim of zero CPU,
zero battery impact, full device coverage or Apple approval is made.
18 changes: 18 additions & 0 deletions FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@

هذا السجل يميز بين المزايا الموجودة والمزايا التي تتطلب إعدادًا أو ما تزال قيد التطوير. لا تعني إضافة واجهة لتكامل أن جميع الأجهزة والخدمات قد اختُبرت.

## تطوير غير منشور — مساحة العمل والزجاج

- خامة Liquid Glass أصلية صافية في خلفية النافذة على macOS 26+، مع بديل للإصدارات الأقدم ومنزلق للشفافية واحترام إعدادات تسهيلات الاستخدام.
- إعداد أول تشغيل وفحص اتصالات الأدوات، وقوالب للبرمجة والتركيز واليوميات، وترتيب بطاقات الرئيسية وإظهارها وإخفائها دون فقد أبعاد الجزيرة أو الملاحظات.
- ملخصا Codex وClaude معاً، وتنبيهات اختيارية داخل الجزيرة عند 80% و95% من حدود الاستخدام المعروفة.
- ربط اختياري بحالات مهام Codex وClaude، يحفظ نسخة احتياطية من إعدادات الخطافات، ويعرض الانتظار والاكتمال دون اتخاذ قرارات موافقة. يتطلب إصداراً يدعم الخطافات ومراجعتها في الأداة الأصلية.
- متابعة اختيارية لـGitHub Actions كل دقيقة، وأنشطة لبدء الأوامر وانتهائها. الموافقات وتنفيذ مهام الوكيل تبقى في أداة البرمجة.
- فحص إصدارات مستقرّة يدوياً أو كل 6 ساعات اختيارياً. توقيع Developer ID وتصديق Apple والتثبيت دون تدخل مؤجّلة بطلب المالك.
- نجحت 52 عملية فحص؛ نطاق الأدلة وما يحتاج أجهزة إضافية موضّح في [مصفوفة التحقق](Docs/VALIDATION.md)، والإعداد في [دليل التكاملات](Docs/INTEGRATIONS.md).

## تطوير غير منشور بعد 0.6.0 — AI Usage

- قراءة محلية كل 5 ثوانٍ، مع مؤقّت يستمر أثناء التفاعل وتحديث بعد الاستيقاظ والعودة للقسم.
- تحديث اختياري لحدود حساب Codex كل دقيقة، مستقل عن القراءة المحلية. تُحفظ التفضيلات وتُعرض حالة الاتصال ووقت آخر نجاح، مع إعادة المحاولة المتدرجة وإبقاء آخر بيانات متاحة عند الفشل.
- قراءة تزايدية للملفات، وإكمال السجلات التي كانت قيد الكتابة، وإبطال نتائج الطلبات القديمة عند تغيير المزوّد أو المجلّد أو إيقاف القراءة.
- إعادة بناء الحساب عند تبديل الملف أو اقتطاعه أو تغيّر اليوم. حد السطر 8 ميجابايت مع تنبيه القراءة الجزئية؛ لا يُخزّن نص المحادثة في الذاكرة المؤقتة.
- نجح الاتصال الفعلي لحدود Codex وقراءة السجلات المحلية؛ لا توجد سجلات Claude على جهاز التحقق، لذا تحقّقنا من صيغته وتحديث سجلاته ببيانات اختبار معزولة. نجحت 45 عملية فحص، وبناء نسخة الإنتاج، وفحص الواجهة باللغتين واستمرار التحديث التلقائي في النافذة.

## تحديث 0.6

- هوية Aurora Orbit وأيقونة نابضة متعددة الأحجام، مع توحيد الشعار وأيقونة الموقع والغلاف.
Expand Down
37 changes: 37 additions & 0 deletions PERFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,40 @@ Notes:
- Timers keep running while the island is collapsed. If a future release
pauses non-essential work when collapsed, idle CPU should drop below this
baseline — record the improvement here.

## Unreleased AI usage reader — 2026-11-02

Local polling now runs every five seconds; the 0.6.0 idle baseline above is
historical and must not be taken as a measurement of this build. An actual
Codex log scan read about 423 MiB in 13.4 seconds on its initial pass; an
immediate incremental pass read about 64 KiB in 0.0024 seconds while logs were
still growing. These are reader timings, not whole-app CPU or memory figures.
Some records/files exceeded the reader limits and were disclosed as partial.
Live Codex account limits fetched successfully. No Claude logs were present on
the test machine; automated fixtures cover its parsing and growing records.

## Workspace build — 2026-11-02

Local Apple Silicon Mac (`Mac16,12`), macOS 27.2, release build. One
60-second sample per build, island collapsed after the initial real Codex
log scan. Local usage polling every five seconds; live account polling,
GitHub Actions and update checks off. Claude logs were absent. The runtime
used real logs with partial-scan limits disclosed in the UI.

| Build | Average sampled CPU | Peak sampled RSS |
| --- | --- | --- |
| Workspace draft before bounding Foundation temporary objects | 0.11% | 535.92 MiB |
| Same workload with a per-chunk autorelease pool (`be574bb`) | 0.12% | 103.28 MiB |

The pool bounds temporary Foundation objects on the Swift concurrency worker
between 256 KiB read chunks. This removes the elevated retained RSS observed
after large scans. The CPU difference is sampling noise; no speed or battery
improvement is inferred from it. These are local samples, not guarantees for
all hardware or log sizes, and the historical integer-rounded 0.6 baseline
uses a different reporting precision.

`Scripts/measure.sh` now preserves fractional CPU values and accepts
`NOTCHEST_PID` to distinguish multiple running app instances. RSS is the
process's resident set, not an allocation-leak measurement. Prolonged battery,
multiple-display and older-system scenarios remain pending in
[the validation matrix](Docs/VALIDATION.md).
Loading
Loading