Commit Graph

33 Commits

Author SHA1 Message Date
9a47dda767 test(core): remove legacy integration tests
Tests were for DataSource/ContextProvider/ContextBridge which are now
deprecated in favor of FeedSource.

Co-authored-by: Ona <no-reply@ona.com>
2026-01-18 23:46:38 +00:00
286a933d1e test(core): add FeedSource integration tests
Tests graph validation (dependency existence, cycle detection, topological
sort) and refresh behavior (context accumulation, item collection).

Co-authored-by: Ona <no-reply@ona.com>
2026-01-18 23:45:05 +00:00
1d9de2851a feat(core): add FeedSource interface
Unifies DataSource and ContextProvider into a single interface that
forms a dependency graph. Sources declare dependencies on other sources
and can provide context, feed items, or both.

Deprecates DataSource, ContextProvider, and ContextBridge.

Co-authored-by: Ona <no-reply@ona.com>
2026-01-18 23:32:47 +00:00
80192c6dc1 Merge pull request #8 from kennethnym/docs/gpg-signing-instruction
docs: add GPG signing instruction to AGENTS.md
2026-01-18 20:41:06 +00:00
0eb77b73c6 docs: add GPG signing instruction to AGENTS.md
Co-authored-by: Ona <no-reply@ona.com>
2026-01-18 20:39:26 +00:00
dfce846c9a Merge pull request #7 from kennethnym/feat/feed-controller-orchestration
feat(core): add FeedController orchestration layer
2026-01-18 20:30:27 +00:00
b73e603c90 feat(core): return RefreshResult from ContextBridge.refresh()
Surfaces provider errors through RefreshResult.errors instead of
silently ignoring them.

Co-authored-by: Ona <no-reply@ona.com>
2026-01-18 20:28:54 +00:00
037589cf4f refactor(core): rename getCurrentValue to fetchCurrentValue
Also use Promise.allSettled in ContextBridge.refresh() to handle
provider errors gracefully.

Co-authored-by: Ona <no-reply@ona.com>
2026-01-18 20:23:54 +00:00
3c16dd4275 feat(core): add FeedController orchestration layer
Adds orchestration for feed reconciliation with context-driven updates:

- FeedController: holds context, debounces updates, reconciles sources
- ContextBridge: bridges context providers to controller
- ContextProvider: reactive + on-demand context value interface
- Branded ContextKey<T> for type-safe context keys

Moves source files to src/ directory and consolidates tests into
integration test.

Co-authored-by: Ona <no-reply@ona.com>
2026-01-18 00:58:29 +00:00
2eff7b49dc Merge pull request #6 from kennethnym/fix/oxfmt-ignore-patterns
fix: ignore .claude and fixtures in oxfmt
2026-01-17 16:11:31 +00:00
d9405a239a fix: ignore .claude and fixtures in oxfmt
Co-authored-by: Ona <no-reply@ona.com>
2026-01-17 16:03:12 +00:00
1ed335f783 Merge pull request #2 from kennethnym/feat/data-source-tfl
Add @aris/data-source-tfl package
2026-01-17 11:58:44 +00:00
6ecf080177 Merge pull request #5 from kennethnym/chore/add-claude-skills
Add Claude skills for React best practices and web design
2026-01-17 11:58:33 +00:00
331a2596fa Add Claude skills for React best practices and web design
- react-best-practices: Performance optimization patterns (client-side only)
- web-design-guidelines: UI review against Web Interface Guidelines

Co-authored-by: Ona <no-reply@ona.com>
2026-01-17 11:53:08 +00:00
482c1c8b0f Resolve bun.lock conflict
Co-authored-by: Ona <no-reply@ona.com>
2026-01-17 11:50:41 +00:00
c90bef0330 Merge pull request #4 from kennethnym/dev/agents-md
docs: add AGENTS.md
2026-01-17 11:49:25 +00:00
de813d5b4a docs: add AGENTS.md
Co-authored-by: Ona <no-reply@ona.com>
2026-01-17 11:48:20 +00:00
552629bcdb Merge pull request #3 from kennethnym/feat/data-source-weatherkit
Add WeatherKit data source package
2026-01-17 01:18:27 +00:00
51749ad811 Include response body in API error messages
Co-authored-by: Ona <no-reply@ona.com>
2026-01-17 01:18:06 +00:00
6cf147989f Refactor WeatherKit client to injectable interface
- Add WeatherKitClient interface and DefaultWeatherKitClient class
- WeatherKitDataSource accepts either client or credentials
- Simplify tests by injecting mock client directly
- Update fixture generation script to use new client class

Co-authored-by: Ona <no-reply@ona.com>
2026-01-17 01:14:18 +00:00
850d1925b6 Add query() tests with mocked API response
Tests transformation logic including:
- Feed item type assignment
- Hourly/daily limits
- Timestamp from context
- Unit conversion (metric/imperial)
- Priority assignment
- Unique ID generation

Co-authored-by: Ona <no-reply@ona.com>
2026-01-17 01:09:39 +00:00
ceb9dbd576 Fix flaky test assertion on condition code
Co-authored-by: Ona <no-reply@ona.com>
2026-01-17 00:40:28 +00:00
7e0f30351f Merge origin/master into feat/data-source-weatherkit
Co-authored-by: Ona <no-reply@ona.com>
2026-01-17 00:39:07 +00:00
494e211844 Add fixture generation instructions to README
Co-authored-by: Ona <no-reply@ona.com>
2026-01-17 00:38:15 +00:00
06c568ad69 Minify fixture and fix lockfile
Co-authored-by: Ona <no-reply@ona.com>
2026-01-17 00:37:22 +00:00
785cbefce4 Add WeatherKit data source package
Implements @aris/data-source-weatherkit for fetching weather data from
Apple WeatherKit REST API.

- WeatherKitDataSource class implementing DataSource interface
- Feed items: current, hourly, daily, and alerts
- Priority adjustment based on weather conditions and alert severity
- Unit conversion (metric/imperial)
- Response validation with arktype
- Test fixtures from real API responses

Co-authored-by: Ona <no-reply@ona.com>
2026-01-17 00:34:46 +00:00
20559b92ad Resolve bun.lock conflict
Co-authored-by: Ona <no-reply@ona.com>
2026-01-17 00:08:29 +00:00
c2f0b03924 Minify fixture JSON
Co-authored-by: Ona <no-reply@ona.com>
2026-01-17 00:07:22 +00:00
8ec8b9a13e Add @aris/data-source-tfl package
TfL data source for tube, overground, and Elizabeth line alerts.

- Fetches line statuses and filters to minor/major delays and closures
- Sorts alerts by severity, then by proximity to user location
- Caches station data after first fetch
- Uses arktype for API response validation
- Supports API injection for testing

Co-authored-by: Ona <no-reply@ona.com>
2026-01-16 23:57:29 +00:00
948ffa1125 Merge pull request #1 from kennethnym/ci/init
Add test script and CI workflow
2026-01-16 23:52:43 +00:00
689878ab71 Fix lockfile package name mismatch
Co-authored-by: Ona <no-reply@ona.com>
2026-01-16 23:52:09 +00:00
9801925ea0 Add test script and CI workflow
- Add top-level test script that runs tests across all workspaces
- Add GitHub Actions workflow to run tests on PRs and merges to master

Co-authored-by: Ona <no-reply@ona.com>
2026-01-16 23:51:05 +00:00
90fd137b77 initial commit 2026-01-16 00:56:55 +00:00