Skip to content

Conversation

@thoroc
Copy link
Contributor

@thoroc thoroc commented Jan 31, 2026

Summary

New utility package providing standardized notification/toast functionality for OpenCode plugins.

Changes

  • Create new notification/toast utility package
  • Provides standardized notification functionality across plugins
  • Zero internal dependencies - foundation package for others
  • Includes full test coverage
  • Exports: showNotification, Notifier class, NotificationOptions type

Dependencies

Blocks

Testing

  • Tests pass: bunx nx test opencode-notification
  • Build succeeds: bunx nx build opencode-notification
  • Type-check passes: bunx nx type-check opencode-notification

@github-actions
Copy link

⚠️ Large PR Warning

This PR is quite large with:

  • 7 changed files
  • 1000 added lines
  • 0 deleted lines

Consider breaking it down into smaller, focused PRs for easier review.

thoroc added a commit that referenced this pull request Feb 1, 2026
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)
thoroc added a commit that referenced this pull request Feb 1, 2026
* 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.
@thoroc thoroc force-pushed the feat/pr2-notification-package branch from 0319533 to 10dec17 Compare February 1, 2026 21:16
@thoroc thoroc requested a review from Copilot February 1, 2026 21:17
@github-actions
Copy link

github-actions bot commented Feb 1, 2026

⚠️ Large PR Warning

This PR is quite large with:

  • 7 changed files
  • 1000 added lines
  • 0 deleted lines

Consider breaking it down into smaller, focused PRs for easier review.

@github-actions
Copy link

github-actions bot commented Feb 1, 2026

⚠️ Large PR Warning

This PR is quite large with:

  • 8 changed files
  • 1170 added lines
  • 7 deleted lines

Consider breaking it down into smaller, focused PRs for easier review.

@github-actions
Copy link

github-actions bot commented Feb 1, 2026

⚠️ Large PR Warning

This PR is quite large with:

  • 8 changed files
  • 1163 added lines
  • 7 deleted lines

Consider breaking it down into smaller, focused PRs for easier review.

Copy link
Contributor

Copilot AI left a 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 createNotifier factory 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>
@github-actions
Copy link

github-actions bot commented Feb 1, 2026

⚠️ Large PR Warning

This PR is quite large with:

  • 8 changed files
  • 1163 added lines
  • 7 deleted lines

Consider breaking it down into smaller, focused PRs for easier review.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Feb 1, 2026

⚠️ Large PR Warning

This PR is quite large with:

  • 8 changed files
  • 1160 added lines
  • 7 deleted lines

Consider breaking it down into smaller, focused PRs for easier review.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Feb 1, 2026

⚠️ Large PR Warning

This PR is quite large with:

  • 8 changed files
  • 1161 added lines
  • 7 deleted lines

Consider breaking it down into smaller, focused PRs for easier review.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Feb 1, 2026

⚠️ Large PR Warning

This PR is quite large with:

  • 8 changed files
  • 1161 added lines
  • 7 deleted lines

Consider breaking it down into smaller, focused PRs for easier review.

@github-actions
Copy link

github-actions bot commented Feb 1, 2026

⚠️ Large PR Warning

This PR is quite large with:

  • 8 changed files
  • 1153 added lines
  • 13 deleted lines

Consider breaking it down into smaller, focused PRs for easier review.

@thoroc thoroc merged commit 1196ccb into main Feb 1, 2026
5 checks passed
@thoroc thoroc deleted the feat/pr2-notification-package branch February 1, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants