Conversation
ContentView references TerminalColorSchemeMode, terminalLightTheme, terminalDarkTheme, applyTheme, and applyColorScheme — all introduced in the PR #11 merge but never committed. This adds the missing pieces: AppSettings terminal properties, TerminalManager theme/color-scheme methods, TerminalSettingsView, and sidebar/settings wiring. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8ed6acee0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| guard let app = ghosttyApp else { | ||
| pendingColorScheme = scheme | ||
| return |
There was a problem hiding this comment.
Clear stale pending theme when queuing plain color scheme
When the terminal runtime has not been initialized yet, applyColorScheme only updates pendingColorScheme and leaves any previously queued pendingTheme intact. Because ensureInitialized prioritizes pendingTheme over pendingColorScheme, a user can pick a custom theme, switch back to default themes before opening Terminal, and still get the old custom theme applied on first launch. Clearing pendingTheme in this branch (or changing initialization precedence) would prevent applying outdated settings.
Useful? React with 👍 / 👎.
Adds `bugbook settings list|get|set` subcommands that read/write app-settings.json directly via JSONSerialization. Secrets are redacted on read and blocked on write. Type coercion matches existing value types (bool, number, string). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The icon was saved to disk (<!-- icon:VALUE -->) but never restored on startup. Workspace restore loaded pane layout without re-parsing file metadata. Added restoreWorkspaceDocumentsIfNeeded() to reload page content from disk after workspace restore, and replaceMarkdown() on BlockDocument so reloads preserve icon/cover metadata. Extracted shared helpers for loadPageContent and injectChildPageLinks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
beginMarqueeBlockSelection() didn't clear focusedBlockId, so stale async attemptFocus retries could steal focus after marquee completed, triggering handleBecomeFirstResponder which cleared selectedBlockIds before delete could process them. Fixed by: clearing focusedBlockId on marquee start, adding staleness guard to attemptFocus retries, and removing redundant focusedBlockId check from editor delete handler. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Frees Cmd+B for bold text formatting in the editor. Updated the keyboard shortcut in BugbookApp and the shortcuts settings label. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
DatabaseFullPageView was the only full-page content view without an explicit background. Added .background(Color.fallbackEditorBg) so empty space below short content blends seamlessly with the editor canvas instead of showing a jarring boundary. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds PaneFindBar view between chrome bar and content. Per-pane find state with real-time block text search, match count, Enter/Shift+Enter cycling, Escape dismiss. Scrolls to matched block via existing scrollToBlockId. V1: block-level navigation without per-character highlighting. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merge duplicate .onKeyPress(.delete) and .onKeyPress(backspace) into a single .onKeyPress(keys:) call with a static key set. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- TerminalManager write_clipboard_cb: dispatch to main thread before accessing NSPasteboard (matches read_clipboard_cb pattern) - SettingsCommand coerceValue: add Int check before Double to prevent integer settings from being stored as strings Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Filter bar now shows clickable "and"/"or" label between filter pills. Click toggles the filter group conjunction. DatabaseViewState syncs filterGroup from flat filters on every mutation. CLI adds --filter-json flag to bugbook query for FilterGroup JSON blobs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds mentionPageNameKey custom attribute to mention spans during parsing, and mouseDown hit detection in BlockTextView to navigate on click. Prior attempts styled mentions visually but missed click interaction. Uses characterIndexForInsertion + attribute lookup — no SwiftUI overlays needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Extract evaluateFormula to DatabaseViewHelpers (was duplicated in TableView and RowPageView) - Fix double evaluateFormula call per property in RowPageView - Cache findMatches in @State, recompute only on query change instead of on every SwiftUI render Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds .lookup PropertyType that follows a relation and mirrors a target property from linked rows. Config UI with two pickers (relation + target property). Values computed at render time, displayed as comma-separated text. Full coverage across table, row detail, CLI, and mobile views. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds .rollup PropertyType that follows a relation, extracts a target property from linked rows, and applies an aggregation function (sum, count, average, min, max). Config UI with three pickers. Values computed at render time via AggregationEngine. Full coverage across table, row detail, property manager, CLI, and mobile views. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Major overhaul of the iOS mobile app to bring it up to par with the macOS desktop app. All features share the same BugbookCore data layer and iCloud workspace, so notes and databases sync seamlessly between devices. New features: - Block editor: rich editing with headings, lists, tasks, code blocks, blockquotes, images, and a formatting toolbar - Database views: table, kanban (horizontal scroll columns), and calendar views with view tab switching - View management: sort, filter, column visibility, grouping, and view creation/deletion - Full property editor: all field types including relation picker, rich dates with range/time toggle, formula/lookup/rollup display, URL/email with open actions - Schema management: add/rename/delete properties, manage select options with colors - Quick capture: text, photo from library, camera, quick action pills for tasks and lists - Settings view: workspace path, iCloud status, storage info - 5-tab navigation: Today, Notes, Databases, Agents, Settings Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nt nav - Switch all views to .navigationBarTitleDisplayMode(.inline) to eliminate the excessive whitespace from large navigation titles - Create MobileDesignTokens.swift with typography scale, spacing values, color palette matching desktop's warm gray Notion-inspired theme - Add mobileCard() modifier for consistent card styling with borders - Redesign Today view: tighter section spacing (24→16pt), card-wrapped recent files with dividers, small-caps section labels - Consistent typography sizing across all views Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Filter & Sort, Edit Schema, New Row in database view. Edit/Done in page editor. Search and New Note in notes view. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the 5-tab layout with a single scrollable screen that acts like the desktop sidebar. Search is always visible at the top. Quick capture is a single-line bar below search. Recent files show as horizontal scroll cards. All files (notes + databases) appear in one unified list with folder hierarchy. Agents and Settings moved to overflow menu (⋯). This matches how a phone should work: one screen of your stuff, fast capture, fast search. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…y audits Dead code removal (-720 lines): - Delete MobileTodayView, MobileNotesView, MobileDatabaseListView — all unreachable after the unified root view redesign - Remove unused MobileTypography, MobileSpacing, MobileOpacity enums Bug fixes: - Fix force-unwrap crash in MobileRelationPickerView when targetSchema is nil - Fix calendar ForEach duplicate "T" key IDs (SwiftUI silently drops one) - Replace String: @retroactive Identifiable with IdentifiableString wrapper to avoid conformance conflicts when both modules are linked Performance: - Use static DateFormatters in calendar view instead of allocating per cell - Remove triple directory traversal in refresh() — skip redundant refreshFiles() Quality: - Remove redundant textFont computed property (both branches returned .body) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… search
Reorder the entire screen based on council feedback:
1. Capture zone is now the hero — large multi-line "What's on your mind?"
input that feels like a writing surface, with "Add to today" button
2. Favorites section reads from desktop's UserDefaults favorites for
iCloud-synced pinned pages
3. Today card is persistent and distinct from recent files
4. Recent section shows compact rows with first-line preview + timestamp
5. Search demoted to magnifying glass icon in nav bar
6. Top bar shows contextual greeting ("Good morning/afternoon/evening")
7. Warmer empty state copy
8. Section headers use sentence case ("Recent", "All files") not
generic small-caps
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…endly dates - Exclude today's daily note from Recent section (already shown as its own card) - Convert raw ISO filenames (2026-04-04) to friendly dates (Saturday, April 4) in the recent list - Hide "All files" section entirely when workspace has no files - Reorder: capture → today → favorites → recent (matches proposed stack) - Fix brace structure in recentSection Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Favorites is now always visible (priority #2 in the layout). When empty, shows a bookmark icon + "Pin your most-used pages from the desktop sidebar" as a gentle nudge. When populated (via iCloud sync with desktop favorites), shows horizontal scroll pills. Also strengthened the today card chevron from muted to secondary weight for better visibility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…eanup Capture flow (Option B): - Text-first: tapping the input opens keyboard immediately - Media icons (camera, mic, link) appear below text field when focused, available but never required — "drop it in" feeling - Camera icon wired to PhotosPicker, saves to Attachments/ and embeds in daily note - "Add to today" button appears alongside icons when text is present - Smooth 150ms animation on focus state transition Card framing: - ScrollView background set to mobileBgPrimary so white extends to edges - Toolbar background matched to mobileBgPrimary — no dark void gap between status bar and content Toolbar: - Search and menu are now independent icons (magnifying glass + ellipsis) instead of grouped in a ToolbarItemGroup pill shape Other: - Favorites capped at 4 visible items with .prefix(4) - Static DateFormatters for todayString and displayName (was allocating per render) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use iCloud.com.bugbook.app container (matches existing container on disk) instead of iCloud.com.maxforsey.Bugbook. Desktop app reads from ~/Documents/Bugbook which is now symlinked to the iCloud container at ~/Library/Mobile Documents/iCloud~com~bugbook~app/Documents/Bugbook. iOS app resolves workspace from the same container via ubiquity API. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…to safe area - Filter _assets, assets, logseq, journals, pages, whiteboards from file tree (internal/legacy folders that shouldn't appear in mobile UI) - Add tap-to-dismiss on ScrollView so tapping outside the capture field dismisses the keyboard - Add .ignoresSafeArea() background on NavigationStack to eliminate black bars at top and bottom of screen Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Parent pages with children: - Pages with companion folders (e.g. "Gateway 8.0.md" + "Gateway 8.0/") are now tappable to open the page AND expandable to see sub-pages. Previously they only showed as expandable folders with no way to open the parent page. Block rendering: - Both MobileMarkdownView and BlockMarkdownConverter parsers now skip YAML frontmatter (---...---) and HTML comments (<!-- ... -->) at the start of files. Previously these were parsed as horizontal rules or garbage paragraphs. Frontmatter preservation: - MobilePageEditorView extracts and stores frontmatter separately before parsing blocks. On save, frontmatter is prepended back to the serialized blocks, preventing data loss for database row files and pages with icon/metadata comments. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use .ignoresSafeArea() on the ScrollView background and at the app root level to fill the status bar and home indicator areas with the app background color instead of black. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…theme SwiftUI's .ignoresSafeArea() doesn't affect the UIWindow root background, which defaults to black. Set UIWindow.backgroundColor and UINavigationBar appearance at the UIKit level to match mobileBgPrimary, eliminating the black bars behind the status bar and home indicator. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Without this key, iOS uses legacy compatibility mode that doesn't extend the app to the full screen on notched/Dynamic Island iPhones. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…solver CLI and macOS were each duplicating workspace path logic and diverging from the iOS app's iCloud-first behavior. Extract one shared resolver in BugbookCore so all three targets canonicalize on the iCloud Bugbook container with a consistent local fallback. - Add BugbookCore/Workspace/WorkspaceResolver.swift with defaultWorkspacePath(allowBlockingICloudLookup:), resolveICloudWorkspacePath, and localFallbackWorkspacePath. Main-actor callers pass allowBlockingICloudLookup: false and upgrade asynchronously; CLI callers block. - Add BugbookCore/Workspace/RawInboxWriter.swift — shared helper for writing raw/ inbox notes, used by the upcoming iOS share extension. - Point MobileWorkspaceService, BugbookCLI, and FileSystemService at the shared resolver. - macOS FileSystemService.defaultWorkspacePath now returns the local path instantly and exposes upgradeDefaultToICloudIfAvailable() for async promotion to iCloud. ContentView.initializeWorkspace kicks off the upgrade only when no recentWorkspaces override is present, preserving the user's folder-picker override. - Add a one-time diagnostic log in FileSystemService.init that points at a manual rsync command when the legacy ~/Library/Application Support/bugbook/ directory is detected alongside an empty canonical workspace. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a BugbookShareExtension target that appears in the iOS share sheet (Safari, Twitter, Photos, Messages, etc.) and writes shared content as a raw markdown note into the same iCloud workspace the main app uses. This is the scaffold — it compiles, embeds in the app bundle, and writes a hardcoded test file via RawInboxWriter. Full attachment handling (URLs, images, tags UI) comes after the demo clip ships. - New target in ios/project.yml + regenerated pbxproj via XcodeGen - ShareViewController subclasses SLComposeServiceViewController for the standard compose UI - Calls WorkspaceResolver.resolveICloudWorkspacePath() and RawInboxWriter.writeRawNote() from BugbookCore - App group (group.com.bugbook.app) added to both the main app and extension entitlements for future shared-state needs - iCloud container + CloudDocuments entitlements on the extension Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Default was 200 which silently truncated results in workspaces with 400+ pages. Changed default to 0 (unlimited). Users can still pass --limit N to cap output if needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
TerminalColorSchemeModeenum and terminal theme properties toAppSettingsapplyColorSchemeandapplyThememethods toTerminalManagerTerminalSettingsViewand wires it into sidebar/settings navigationThese files were referenced by ContentView changes merged in PR #11 but never committed, causing CI build failures on main.
Test plan
🤖 Generated with Claude Code