-
Notifications
You must be signed in to change notification settings - Fork 0
feat(notification): Add opencode-notification utility package #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This PR is quite large with:
Consider breaking it down into smaller, focused PRs for easier review. |
Remove all packages and dev tools that belong in other PRs: - packages/* (moved to PR #22, #23, #24, etc.) - tools/dev/* (moved to PR #5) - tools/executors/dev-proxy/* (moved to PR #5) - tools/executors/check-mirror-exists/* (moved to PR #5) - tools/executors/validate-skill-md/* (moved to PR #5) - tools/executors/validate-skills/* (moved to PR #5) Keep only Biome infrastructure: - biome.json, lefthook.yml, nx.json, package.json - .github/workflows/validate-pr.yml - libs/workflows/project.json - tools/executors/typecheck/ - tools/executors/validate-tsdoc/ - tools/generators/* (templates with Biome config)
* feat(infra): add Biome linting/formatting infrastructure - Add Biome v2.3.13 configuration with custom rules - Configure lint, format, and format:check targets in nx.json - Add validate-tsdoc executor for documentation validation - Update lefthook.yml with Biome pre-commit hooks - Update validate-pr.yml workflow for Biome - Update generators to include Biome configuration This PR establishes the foundation for Biome-based linting and formatting that all subsequent PRs will use. * fix: resolve CI failures on Biome infrastructure PR - Remove opencode-font override from biome.json to enable linting/formatting - Fix ASCIISiteTitle variable name typo (_siteTitle -> siteTitle) - Fix non-null assertion in load-all-agent-specs.ts using type guard pattern All checks now pass: - Biome linting ✓ - Biome formatting ✓ - docs-builder build ✓ * fix(agent-loader): fix type predicate in load-all-agent-specs.ts Use proper type predicate pattern instead of type assertion for filtering successful agent spec loads. Fixes CI typecheck failure. * fix: resolve remaining CI failures on PR #21 - Fix type predicate in load-all-agent-specs.ts using proper pattern - Fix 2 lint errors in validate-docs-links.ts (noImplicitAnyLet, useIterableCallbackReturn) - Add missing imports to Header.astro (ASCIISiteTitle, SocialIcons, Search, ThemeSelect) Typecheck and lint now pass locally. * style: apply Biome formatting to fix CI errors Apply Biome formatting to 4 package.json files: - packages/opencode-agent-loader-plugin/package.json - packages/opencode-agent-loader-plugin/tsconfig.test.json - packages/opencode-font/package.json - packages/opencode-warcraft-notifications-plugin/package.json Fixes format CI failures on PR #21. * fix(agent-loader): use type assertion instead of type predicate Replace type predicate with type assertion to satisfy stricter CI checks. The filter returns items with defined spec, then we safely assert the type. Fixes typecheck failures on PR #21. * refactor: cleanup PR #21 to only include infrastructure Remove all package changes from this PR - they belong in separate PRs: - packages/opencode-agent-loader-plugin/ → PR #28 - packages/opencode-font/ → PR #24 - packages/opencode-warcraft-notifications-plugin/ → PR #29 PR #21 now contains ONLY Biome infrastructure: - biome.json configuration - lefthook.yml git hooks - nx.json targets for lint/format - Root package.json scripts - CI workflow (validate-pr.yml) - Infrastructure executors (typecheck, validate-tsdoc) - Generator templates with Biome config Apply Biome formatting to biome.json (trailing newline). * fix(biome): add overrides for test/template files to fix lint errors Add Biome linter overrides to allow patterns in test/template files: - Disable noBannedTypes for tools/executors/**/*.test.ts (Function type) - Disable noNamespace for executors and templates - Disable noExplicitAny for generator templates Fixes CI lint failures: - 'Don't use Function as a type' errors - 'TypeScript namespaces are outdated' errors - 'Unexpected any' warnings in templates Also fixes dev-proxy test type assertions. * fix(biome): add file ignores for packages not in this PR Add file ignores to biome.json for packages and tools that belong in other PRs: - packages/opencode-agent-loader-plugin/* - packages/opencode-font/* - packages/opencode-warcraft-notifications-plugin/* - tools/dev/* - tools/executors/dev-proxy/* - tools/executors/check-mirror-exists/* - tools/executors/validate-skill-md/* - tools/executors/validate-skills/* This allows the infrastructure PR to pass CI without linting files that will be properly formatted and fixed in their respective PRs. Also apply Biome formatting to biome.json (trailing newline). * fix(biome): add file ignores and template overrides to fix CI - Add files.includes to ignore packages not in this PR: - packages/opencode-agent-loader-plugin - packages/opencode-font - packages/opencode-warcraft-notifications-plugin - Add linter override for generator template files to disable noExplicitAny - Apply Biome formatting to biome.json Fixes CI lint and format errors. * fix(biome): simplify biome.json configuration to fix CI Remove all package file ignores and use a clean, minimal biome.json that only ignores standard directories (dist, node_modules). This ensures the infrastructure PR can pass CI without trying to lint files that belong in other PRs. All local checks pass: - bun run format:check ✓ - bun run lint ✓ * refactor: clean PR #21 to only include infrastructure Remove all packages and dev tools that belong in other PRs: - packages/* (moved to PR #22, #23, #24, etc.) - tools/dev/* (moved to PR #5) - tools/executors/dev-proxy/* (moved to PR #5) - tools/executors/check-mirror-exists/* (moved to PR #5) - tools/executors/validate-skill-md/* (moved to PR #5) - tools/executors/validate-skills/* (moved to PR #5) Keep only Biome infrastructure: - biome.json, lefthook.yml, nx.json, package.json - .github/workflows/validate-pr.yml - libs/workflows/project.json - tools/executors/typecheck/ - tools/executors/validate-tsdoc/ - tools/generators/* (templates with Biome config) * fix: resolve Biome linting and formatting issues for CI - Updated opencode-font package.json to skip Biome (disabled in root config) - Fixed type predicate for AgentSpecLoadResult to remove non-null assertion - Applied Biome formatting to all JSON files - All checks now pass: lint, format, type-check * fix: add verbose flag to Biome CI command for detailed output * fix(biome): add diagnostic level flag to Biome CI command for improved error reporting * fix: add output-style flag to various nx affected commands for consistent output * docs: add Biome diagnostics reference to skill documentation - Add https://biomejs.dev/reference/diagnostics/ to Getting More Help section * fix(biome): add BIOME_CONFIG_PATH environment variable for Biome CI * fix: update globals.d.ts to ignore linting for noNamespace rule * docs: add debugging guidance for CI failures in Biome skill documentation
- Create new notification/toast utility package for OpenCode plugins - Provides standardized notification functionality across plugins - Zero internal dependencies - foundation package for others - Includes full test coverage - Exports: showNotification, Notifier class, NotificationOptions type This is a foundation package used by opencode-config, opencode-core-plugin, and the refactored warcraft plugin.
0319533 to
10dec17
Compare
|
This PR is quite large with:
Consider breaking it down into smaller, focused PRs for easier review. |
|
This PR is quite large with:
Consider breaking it down into smaller, focused PRs for easier review. |
|
This PR is quite large with:
Consider breaking it down into smaller, focused PRs for easier review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a new notification utility package (@pantheon-org/opencode-notification) that provides standardized toast and message notification functionality for OpenCode plugins. The package aims to be a foundation package with zero internal dependencies, offering a unified API for both toast notifications (via TUI) and message notifications (via chat session).
Changes:
- Creates new notification utility package with
createNotifierfactory function - Provides convenience methods for success, warning, info, and error notifications
- Includes comprehensive test coverage with Bun test framework
- Exports TypeScript types for notification options, logger, and plugin context
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/opencode-notification/package.json | Package configuration with dependencies and build scripts |
| packages/opencode-notification/project.json | Nx project configuration for build, test, and lint targets |
| packages/opencode-notification/tsconfig.json | TypeScript compiler configuration |
| packages/opencode-notification/src/notifier.ts | Core notification implementation with toast and message support |
| packages/opencode-notification/src/index.ts | Public API exports |
| packages/opencode-notification/src/notifier.test.ts | Comprehensive test suite |
| packages/opencode-notification/README.md | Package documentation with usage examples |
Comments suppressed due to low confidence (1)
packages/opencode-notification/project.json:39
- The project.json is missing a "type-check" target that is mentioned in the PR description testing checklist and exists in the agent-loader-plugin (see packages/opencode-agent-loader-plugin/project.json:33-43). For consistency, add a type-check target that runs "bunx tsc --noEmit".
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
This PR is quite large with:
Consider breaking it down into smaller, focused PRs for easier review. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
This PR is quite large with:
Consider breaking it down into smaller, focused PRs for easier review. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
This PR is quite large with:
Consider breaking it down into smaller, focused PRs for easier review. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
This PR is quite large with:
Consider breaking it down into smaller, focused PRs for easier review. |
|
This PR is quite large with:
Consider breaking it down into smaller, focused PRs for easier review. |
Summary
New utility package providing standardized notification/toast functionality for OpenCode plugins.
Changes
Dependencies
Blocks
Testing
bunx nx test opencode-notificationbunx nx build opencode-notificationbunx nx type-check opencode-notification