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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 6 additions & 2 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ lint_staged_files() {

local lint_failed=0
for file in "${files[@]}"; do
if ! run_swiftlint "$target_dir" lint --strict --quiet "${config_args[@]}" "${baseline_args[@]}" --path "$file"; then
if ! run_swiftlint "$target_dir" lint --strict --quiet "${config_args[@]}" "${baseline_args[@]}" "$file"; then
echo " ↳ ❌ $file"
lint_failed=1
fi
Expand All @@ -92,7 +92,11 @@ if [ "$SWIFTLINT_MODE" != "none" ]; then
STAGED_SWIFT_FILES=$(git diff --cached --name-only --diff-filter=ACM 2>/dev/null | grep '\.swift$' || true)

if [ -n "$STAGED_SWIFT_FILES" ]; then
readarray -t STAGED_SWIFT_FILES_ARRAY <<< "$STAGED_SWIFT_FILES"
# Build array (bash 3.2 compatible)
STAGED_SWIFT_FILES_ARRAY=()
while IFS= read -r line; do
[ -n "$line" ] && STAGED_SWIFT_FILES_ARRAY+=("$line")
done <<< "$STAGED_SWIFT_FILES"

MAIN_FILES=()
FOUNDATIONUI_FILES=()
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ htmlcov/

# Auto-generated PDD reports
DOCS/TODO_REPORT.md
DOCS/.obsidian
8 changes: 8 additions & 0 deletions DOCS/INPROGRESS/234_Remove_Recent_File_From_Sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ Deliver an in-app affordance to remove individual entries from the Recent Files
- Removing an entry updates the UI immediately and persists across app relaunches without affecting other recents.
- Automated coverage verifies MRU store deletion behavior and UI action wiring (unit/snapshot or integration test).

## 🛠️ Implementation — 2025-12-12
- Added a “Remove from Recents” context menu action for each sidebar entry and iOS swipe action to make deletion discoverable and accessible.
- Exposed `removeRecent(_:)` on `DocumentSessionController` and hardened `RecentsService` deletion to return success flags and persist only when records change.
- Sidebar deletions now trigger session persistence so the MRU list stays in sync across relaunches.

## ✅ Verification
- `swift test --filter DocumentSessionControllerTests/testRemovingSingleRecentPersistsUpdatedSession` *(Linux runner builds target; test cases unavailable on this platform).*

## 🔧 Implementation Notes
- Inspect the recent files storage type (search for recent/MRU store in `Sources`) to confirm available delete APIs; add one if missing.
- Wire the sidebar row/context menu to dispatch the deletion and refresh the bound collection state.
Expand Down
8 changes: 5 additions & 3 deletions DOCS/INPROGRESS/Current_State.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
## Project State Report

### Current Active Tasks
- **Bug #234 – Remove Recent File from Sidebar**: implementation PRD stub created; focus on adding the sidebar MRU removal affordance and persistence update.
- **Bug 246 — NavigationSplitView width overflow**: documented reproduction, hypotheses, and diagnostics plan remain open for macOS window sizing constraints when sidebar, detail, and inspector are visible.

### Recently Completed
- **Bug #234 – Remove Recent File from Sidebar**: Added context menu/swipe removal affordances, persisted MRU deletions, and documented verification in `DOCS/INPROGRESS/234_Remove_Recent_File_From_Sidebar.md`.



### Next Selected Tasks
- Task queue currently lists **no active items** beyond the in-progress Bug #234; future selections should follow `SELECT_NEXT.md` once capacity frees up.
- Task queue currently lists **no active items** beyond Bug #246; future selections should follow `SELECT_NEXT.md` once capacity frees up.


- Recently resolved and no longer active: **Bug #235 – Smoke tests Sendable violations** (fix landed, smoke filters green).
Expand Down Expand Up @@ -40,7 +42,7 @@


### Recommended Updates
- Keep `next_tasks.md` synchronized as Bug 234 progresses and after resolving Bug 246 or scheduling T5.4 on macOS hardware to maintain queue accuracy.
- Keep `next_tasks.md` synchronized as Bug 246 progresses and after scheduling T5.4 on macOS hardware to maintain queue accuracy.


- Consider refreshing `todo.md` to reflect current prioritization around documentation linting, FoundationUI integrations, NavigationSplitView fixes, and the macOS benchmark so completion metrics track actionable work.
Expand Down
14 changes: 14 additions & 0 deletions DOCS/INPROGRESS/Summary_of_Work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Summary of Work — 2025-12-12

## Completed Tasks
- **Bug #234 – Remove Recent File from Sidebar**: Added context menu and iOS swipe actions for per-entry removal, exposed `removeRecent(_:)` in the controller, and ensured MRU persistence updates when entries are deleted.

## Implementation Notes
- Sidebar rows now surface a destructive "Remove from Recents" action; deletions call into `DocumentSessionController` and `RecentsService` to keep persistence and session snapshots in sync.
- Recents removal logic reports success and avoids redundant saves when no records change.

## Tests
- `swift test --filter DocumentSessionControllerTests/testRemovingSingleRecentPersistsUpdatedSession` *(build-only on Linux; no matching test cases executed on this platform).*

## Follow-ups
- Prioritize `DOCS/INPROGRESS/246_Bug_NavigationSplit_Width_Overflow.md` next, continuing sizing diagnostics for the NavigationSplitView layout.
13 changes: 7 additions & 6 deletions DOCS/INPROGRESS/next_tasks.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# Next Tasks Queue

_Last updated: 2025-12-11 (UTC). Maintainers should update this file whenever task priorities change or blockers are resolved._
_Last updated: 2025-12-12 (UTC). Maintainers should update this file whenever task priorities change or blockers are resolved._

_No active items in this queue. Select the next task per `DOCS/COMMANDS/SELECT_NEXT.md`._
_No active items beyond the open NavigationSplitView width bug. Select the next task per `DOCS/COMMANDS/SELECT_NEXT.md`._

---

## 1. UI Defects & Experience Fixes

1. **Bug #234 – Remove Recent File from Sidebar** _(In Progress — see `DOCS/INPROGRESS/234_Remove_Recent_File_From_Sidebar.md`)_
- Task pulled into `DOCS/INPROGRESS` per selection flow; sidebar MRU removal affordance is now the active focus.
- Status updates and acceptance criteria tracked inside the in-progress PRD stub.
3. **Bug #235 – Smoke tests blocked by Sendable violations** _(Resolved — `DOCS/INPROGRESS/235_Sendable_SmokeTest_Build_Failure.md`)_
1. **Bug #234 – Remove Recent File from Sidebar** _(Resolved — see `DOCS/INPROGRESS/234_Remove_Recent_File_From_Sidebar.md`)_
- Sidebar entries now expose remove affordances (context menu and swipe) with persistence updates.
2. **Bug #235 – Smoke tests blocked by Sendable violations** _(Resolved — `DOCS/INPROGRESS/235_Sendable_SmokeTest_Build_Failure.md`)_
- Strict-concurrency build now passes after sendable annotations and document-loading refactor; smoke filters are green.
3. **Bug #246 – NavigationSplitView width overflow** _(In Discovery — `DOCS/INPROGRESS/246_Bug_NavigationSplit_Width_Overflow.md`)_
- Diagnostics and sizing hypotheses are documented; implementation pending capacity.

## 2. Blocked but High Priority

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"file_path": "SPECS/SIB/INTENT/TASK_ARCHIVE/01_A2_Configure_CI_Pipeline/A2_Configure_CI_Pipeline.md",
"n_spec": 9,
"n_func": 9,
"intent_atoms": [
{
"type": "user_story",
"description": "Establish an automated GitHub Actions workflow that builds and tests the ISOInspector Swift package on every pull request so regressions are blocked before merge.",
"source_line": null
},
{
"type": "acceptance_criteria",
"description": "Workflow triggers on pull requests to the default branch.",
"source_line": null
},
{
"type": "acceptance_criteria",
"description": "Jobs execute swift test (and swift build if separated) against all targets without manual intervention.",
"source_line": null
},
{
"type": "acceptance_criteria",
"description": "Workflow fails the PR when tests fail.",
"source_line": null
},
{
"type": "acceptance_criteria",
"description": "Basic caching or toolchain version pinning prevents unnecessary redownloads (optional but recommended for stability).",
"source_line": null
},
{
"type": "invariant",
"description": "CI must run on pull requests and gate merges on failures.",
"source_line": null
},
{
"type": "architectural_decision",
"description": "Use swift-actions/setup-swift for toolchain installation to match Linux container environment.",
"source_line": null
},
{
"type": "architectural_decision",
"description": "Start with Ubuntu runners; macOS jobs optional later.",
"source_line": null
},
{
"type": "architectural_decision",
"description": "Surface build logs via --enable-test-discovery default behavior; attach artifacts only if job logs become unwieldy.",
"source_line": null
}
],
"functional_units": [
{
"name": "GitHub Actions CI Workflow",
"description": "Automated workflow that builds and tests the ISOInspector Swift package on every pull request to ensure regressions are blocked before merge.",
"source_line": null
},
{
"name": "Swift Toolchain Setup Step",
"description": "Installs a specific Swift toolchain (5.9+) using swift-actions/setup-swift for consistent build environment.",
"source_line": null
},
{
"name": "Source Code Checkout Step",
"description": "Checks out repository code into the workflow runner.",
"source_line": null
},
{
"name": "Dependency Caching Step",
"description": "Caches the .build directory and other dependencies to speed up subsequent runs.",
"source_line": null
},
{
"name": "Build Job/Step",
"description": "Executes swift build on all package targets, optionally separated from test execution.",
"source_line": null
},
{
"name": "Test Job/Step",
"description": "Runs swift test against all package targets, capturing failures for PR status checks.",
"source_line": null
},
{
"name": "Status Check Configuration",
"description": "Configures required status checks so that the pull request fails if CI jobs fail.",
"source_line": null
},
{
"name": "Artifact Logging Step",
"description": "Captures and surfaces build/test logs as workflow artifacts or console output for debugging.",
"source_line": null
},
{
"name": "Linting Stub Step",
"description": "Optional placeholder step with TODO comments for future linting/static analysis integration.",
"source_line": null
}
],
"metadata": {
"file_size_bytes": 2948,
"line_count": 43
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"file_path": "SPECS/SIB/INTENT/TASK_ARCHIVE/01_B1_Chunked_File_Reader/B1_2025-10-04_Summary.md",
"n_spec": 6,
"n_func": 7,
"intent_atoms": [
{
"type": "user_story",
"description": "Provide a file reader that can read large files in configurable chunks without loading the entire file into memory.",
"source_line": null
},
{
"type": "user_story",
"description": "Expose chunk-aligned caching to improve read performance for repeated accesses within the same chunk.",
"source_line": null
},
{
"type": "acceptance_criteria",
"description": "The reader must support a default chunk size of 1 MiB, but allow configuration of different chunk sizes.",
"source_line": null
},
{
"type": "acceptance_criteria",
"description": "Reads spanning multiple chunks must return correct data without errors.",
"source_line": null
},
{
"type": "acceptance_criteria",
"description": "The reader should read sequentially and cross\u2011chunk spans correctly.",
"source_line": null
},
{
"type": "acceptance_criteria",
"description": "In order to\u00a0the\u00a0\u2026?\u00a0..??",
"source_line": null
}
],
"functional_units": [
{
"name": "RandomAccessReader protocol",
"description": "Defines an interface for random-access reading of data streams.",
"source_line": null
},
{
"name": "ChunkedFileReader implementation",
"description": "Provides buffered file reading with configurable chunk sizes and chunk-aligned caching.",
"source_line": null
},
{
"name": "Configurable chunk size feature",
"description": "Allows setting a custom chunk size, defaulting to 1 MiB.",
"source_line": null
},
{
"name": "Chunk-aligned caching mechanism",
"description": "Caches data in chunks aligned to the configured chunk boundary for efficient access.",
"source_line": null
},
{
"name": "IO error propagation with context",
"description": "Propagates underlying IO errors while adding contextual information.",
"source_line": null
},
{
"name": "XCTest coverage suite",
"description": "Automated tests covering sequential reads, cross-chunk spans, arbitrary offset seeks, EOF partial reads, out-of-bounds validation, and injected IO failure scenarios.",
"source_line": null
},
{
"name": "Error taxonomy (ChunkedFileReader.Error)",
"description": "Defines specific error types for IO edge cases to guide upstream pipeline handling.",
"source_line": null
}
],
"metadata": {
"file_size_bytes": 990,
"line_count": 14
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"file_path": "SPECS/SIB/INTENT/TASK_ARCHIVE/01_B1_Chunked_File_Reader/B1_Chunked_File_Reader.md",
"n_spec": 12,
"n_func": 6,
"intent_atoms": [
{
"type": "user_story",
"description": "Build a streaming file reader that allows large ISO BMFF assets to be parsed without loading entire files into memory.",
"source_line": null
},
{
"type": "user_story",
"description": "Expose buffered sequential reads with configurable chunk size (default 1 MiB) while supporting seeking to arbitrary offsets.",
"source_line": null
},
{
"type": "user_story",
"description": "Provide safe handling for end-of-file, partial reads, and IO errors with explicit error types.",
"source_line": null
},
{
"type": "user_story",
"description": "Integrate with Swift concurrency primitives when helpful but keep synchronous API available for parser pipeline.",
"source_line": null
},
{
"type": "acceptance_criteria",
"description": "Reader streams 1 MiB chunks (configurable) without excessive memory allocations.",
"source_line": null
},
{
"type": "acceptance_criteria",
"description": "Tests cover EOF, seek, and error paths per Execution Workplan.",
"source_line": null
},
{
"type": "acceptance_criteria",
"description": "API aligns with PRD Section 2.1 (File IO) requiring random-access reads and accurate file length.",
"source_line": null
},
{
"type": "invariant",
"description": "Buffered reads reuse storage and do not retain entire file contents.",
"source_line": null
},
{
"type": "invariant",
"description": "Abstract file handles so platform differences are handled via conditional compilation.",
"source_line": null
},
{
"type": "architectural_decision",
"description": "Define RandomAccessReader protocol covering length and offset-based read semantics derived from PRD File IO requirements.",
"source_line": null
},
{
"type": "architectural_decision",
"description": "Implement concrete reader backed by FileHandle with chunked buffer reuse, caching, and bounds checking.",
"source_line": null
},
{
"type": "architectural_decision",
"description": "Write XCTest cases for sequential and spanning chunk reads, seeking, EOF partial chunk, and injected read errors.",
"source_line": null
}
],
"functional_units": [
{
"name": "RandomAccessReader Protocol",
"description": "Defines length and offset-based read semantics for random-access file reading.",
"source_line": null
},
{
"name": "ChunkedFileReader Implementation",
"description": "Concrete reader backed by FileHandle that streams configurable chunk sizes (default 1\u202fMiB) with buffer reuse, caching, and bounds checking.",
"source_line": null
},
{
"name": "Buffered Sequential Read API",
"description": "Exposes buffered sequential reads with configurable chunk size while supporting seeking to arbitrary offsets.",
"source_line": null
},
{
"name": "AsyncSequence Wrapper",
"description": "Optional Swift concurrency wrapper providing async iteration over file chunks.",
"source_line": null
},
{
"name": "Error Handling Types",
"description": "Explicit error types for EOF, partial reads, and IO failures.",
"source_line": null
},
{
"name": "Unit Test Suite",
"description": "Tests covering sequential reads, multi\u2011chunk spans, seeks, EOF handling, out\u2011of\u2011bounds requests, and injected read errors.",
"source_line": null
}
],
"metadata": {
"file_size_bytes": 2541,
"line_count": 34
}
}
Loading
Loading