Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (39)
WalkthroughPull request adds stack trace parsing and rendering (Java-specific), implements typed action/bulk action registration with generic response types, adds response metadata tracking for OpenAPI schema generation, introduces a GatedStderr writer for interactive rendering control, and switches API documentation from Swagger UI to Scalar. Changes
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
Add support for including a hidden _id column in table rows for wrapped entities (entityWithID). The _id column is automatically added to the Columns() output and included in Row() and PrettyRow() data, but marked as hidden so it doesn't appear as a visible column in the UI. This allows the _id metadata to be available in row data while keeping the table display clean. Updates the HTML React formatter to handle cells that exist in row data but not in the column definitions. Adds comprehensive test coverage for all entity types (TableProvider, PrettyRow, and plain structs) to verify the _id column is properly included in the output data but hidden from the visible columns. Refs: entity wrapping, table formatting
…r entities Introduce a third generic type parameter R to Entity for specifying response types returned by Get/Create/Update operations. This enables accurate OpenAPI schema generation for entity responses. Add EntityBuilder fluent API for ergonomic entity registration with type safety. Replace Action and BulkAction struct types with factory functions (Action, ActionWithFlags, BulkAction, BulkFilterAction, BulkActionWithFilter) that return interface-based specs with builder methods. Add ResponseOpenAPIMeta registry to track static response types for commands, enabling OpenAPI generation without executing handlers. Update OpenAPI generator to reflect Go types in response schemas, including support for arrays, nested objects, time.Time formatting, and field-level JSON/pretty tags. Update example entity demo to use new builder API and typed responses. Replace Swagger UI with Scalar API reference in documentation server. BREAKING CHANGE: Entity type signature changed from Entity[T, ListOpts] to Entity[T, ListOpts, R]. Action and BulkAction are now factory functions returning interface types; update action definitions to use Action(), ActionWithFlags(), BulkAction(), BulkFilterAction(), or BulkActionWithFilter().
Add examples/enitity/webapp/dist/ to gitignore to prevent build artifacts from being tracked in version control.
Add optional Method field to EntityOperation and ActionInfo to allow explicit HTTP method specification for generated RPC/OpenAPI routes. This enables actions to override the default inferred HTTP method (e.g., using GET for a records action instead of the inferred POST). The Method field is propagated through the command annotation system and checked during HTTP method inference in the RPC converter, allowing fine-grained control over operation semantics. Includes test coverage for entity actions with explicit GET method using nested entity paths.
…e render Introduce IsInteractiveRenderActive() to check if the task renderer owns the TTY, and GatedStderr() writer that silently drops writes when interactive rendering is active. This allows callers that emit to stderr (e.g., loggers, debug prints) to avoid corrupting the renderer's in-place frame without requiring explicit coordination. The gating is stateless and rechecks ownership per write, enabling writers captured before rendering starts to still gate correctly when the renderer later acquires the TTY.
Introduce comprehensive stack trace support with language-agnostic parsing, styled rendering, and extensible source resolution. Adds StackTrace, StackFrame types and ParseJavaStackTrace parser to api package, with public convenience wrappers in clicky root. Includes support for frame filtering, context lines, and max frame truncation. Also adds MultiFilter type for comma-separated flag values with include/exclude semantics, and fixes field value assignment to support type conversion in flags package. Updates cache debug output to use task.GatedStderr() instead of os.Stderr to prevent log lines from breaking interactive renderer frame accounting. Fixes recursive struct handling in OpenAPI schema generation by tracking visited types. Refs: stack trace rendering, source context, Java exception parsing
10a88bb to
703988a
Compare
Update documentation and test examples to use generic package names (com.example.admin) instead of specific internal package names (com.adminserver). This makes the codebase more suitable for public documentation and examples without exposing internal naming conventions.
## [1.21.8](v1.21.7...v1.21.8) (2026-05-01) ### ⚠ BREAKING CHANGES * Entity type signature changed from Entity[T, ListOpts] to Entity[T, ListOpts, R]. Action and BulkAction are now factory functions returning interface types; update action definitions to use Action(), ActionWithFlags(), BulkAction(), BulkFilterAction(), or BulkActionWithFilter(). * chore(gitignore): ignore entity webapp dist directory Add examples/enitity/webapp/dist/ to gitignore to prevent build artifacts from being tracked in version control. * feat(entity): Add explicit HTTP method override for entity operations Add optional Method field to EntityOperation and ActionInfo to allow explicit HTTP method specification for generated RPC/OpenAPI routes. This enables actions to override the default inferred HTTP method (e.g., using GET for a records action instead of the inferred POST). The Method field is propagated through the command annotation system and checked during HTTP method inference in the RPC converter, allowing fine-grained control over operation semantics. Includes test coverage for entity actions with explicit GET method using nested entity paths. * feat(task): Add stderr gating to prevent corruption during interactive render Introduce IsInteractiveRenderActive() to check if the task renderer owns the TTY, and GatedStderr() writer that silently drops writes when interactive rendering is active. This allows callers that emit to stderr (e.g., loggers, debug prints) to avoid corrupting the renderer's in-place frame without requiring explicit coordination. The gating is stateless and rechecks ownership per write, enabling writers captured before rendering starts to still gate correctly when the renderer later acquires the TTY. * feat(api): add stack trace parsing and rendering with source resolution Introduce comprehensive stack trace support with language-agnostic parsing, styled rendering, and extensible source resolution. Adds StackTrace, StackFrame types and ParseJavaStackTrace parser to api package, with public convenience wrappers in clicky root. Includes support for frame filtering, context lines, and max frame truncation. Also adds MultiFilter type for comma-separated flag values with include/exclude semantics, and fixes field value assignment to support type conversion in flags package. Updates cache debug output to use task.GatedStderr() instead of os.Stderr to prevent log lines from breaking interactive renderer frame accounting. Fixes recursive struct handling in OpenAPI schema generation by tracking visited types. Refs: stack trace rendering, source context, Java exception parsing * docs(api): replace example package names with generic examples Update documentation and test examples to use generic package names (com.example.admin) instead of specific internal package names (com.adminserver). This makes the codebase more suitable for public documentation and examples without exposing internal naming conventions. ### ✨ Features * add entity response types, task stderr gating, and stack trace support ([#101](#101)) ([0a2d157](0a2d157))
|
🎉 This PR is included in version 1.21.8 |
What
Why
Breaking Changes
Entity[T, ListOpts]→Entity[T, ListOpts, R]Action(),ActionWithFlags(),BulkAction(),BulkFilterAction(), orBulkActionWithFilter()Notes
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Tests