added nested steps and several other features#2
Merged
Conversation
- Introduced the ability to create child steps within parent steps, allowing for better tracking and management of workflows. - Updated the StepHandlerContext to include parentStepId and stepId for improved context handling. - Added UnhandledChildStepsError to manage cases where parent steps complete without awaiting child steps. - Enhanced documentation in CLAUDE.md to reflect the new nested steps functionality and its usage. - Updated database schema to support parent-child relationships in job steps. - Modified various components and tests to accommodate the new nested steps feature.
- Implemented a new time travel functionality allowing jobs to restart from specific steps, preserving completed branch siblings. - Updated the database schema to include a 'branch' column in job steps for independent step management. - Enhanced the StepOptions schema to support branch steps and added relevant logic in the StepManager. - Introduced new API endpoints and client methods for time traveling jobs. - Updated the dashboard to allow users to initiate time travel from the UI. - Added comprehensive tests to validate time travel behavior and edge cases.
…dren - Updated SQL queries to enhance the logic for keeping completed steps, including branch siblings and their descendants. - Introduced a new action for testing nested branches, ensuring that time travel correctly preserves sibling branches and their nested steps. - Added comprehensive tests to validate the behavior of time travel when targeting steps within nested branches.
- Added SQL logic to calculate and apply a time offset for preserved job steps, aligning their start and finish times with the current time. - Enhanced the update process for job steps to ensure accurate time tracking while maintaining the integrity of completed steps.
- Updated CSS variables for light and dark themes to improve color consistency and accessibility. - Refactored the BadgeStatus component to utilize a configuration object for status management, enhancing maintainability and readability. - Removed hardcoded color classes in favor of a structured status configuration, allowing for easier updates and customization.
- Wrapped the ApiProvider and AuthProvider in a StepViewProvider to manage step view context. - Removed the TimelineModal component and integrated timeline functionality directly into the StepList component. - Updated Dashboard and JobDetails components to streamline visibility logic and improve layout for mobile and desktop views. - Enhanced StepList to toggle between list and timeline views, improving user experience and accessibility.
- Added a new `fillHeight` prop to the DataTable component, allowing it to expand and fill available height with a fixed header, scrollable body, and fixed pagination footer. - Refactored the JobsTable component to simplify its layout by removing unnecessary wrapper elements, improving readability and performance. - Updated the Dashboard view to utilize the new JobsTable layout, enhancing the overall user experience.
- Updated the DataTable component to adjust the border styling for better visual separation. - Simplified the JobsTable layout by removing unnecessary padding, enhancing the overall design and usability.
…functionality - Updated the JobDetails component to include an optional onClose prop for better control over visibility. - Simplified the Dashboard layout by integrating JobDetails directly, enhancing the user experience. - Adjusted padding and border styles across various components for a more consistent design.
- Replaced the 'branch' concept with 'parallel' in job step options, allowing steps to run independently from siblings during time travel. - Updated related components, schemas, and tests to reflect the new parallel execution model. - Enhanced documentation and comments to clarify the changes in step behavior and time travel logic.
…components - Introduced the `react-resizable-panels` library to enable resizable panel functionality in the Dashboard view. - Refactored the layout to support vertical and horizontal resizing of Jobs, Job Details, and Steps sections for improved user experience. - Created new `ResizablePanelGroup`, `ResizablePanel`, and `ResizableHandle` components for better modularity and reusability. - Updated JobDetails component to enhance the display of job information and maintain consistent styling across the application.
…ved configuration management - Replaced the StepViewProvider with a new LayoutProvider to manage layout configurations for both desktop and mobile views. - Added a LayoutContext to handle layout settings, including step view types and panel sizes, enhancing user customization. - Updated the Dashboard component to utilize the new layout context, allowing for dynamic resizing of panels based on user preferences. - Removed the deprecated StepViewContext to streamline the codebase and improve maintainability.
…izing logic - Removed deprecated migration logic for old step view types from the layout configuration loading process. - Updated the LayoutProvider to load configuration synchronously on the first render, preventing a flash of default layout. - Improved panel resizing logic in the Dashboard component by adding checks to ensure required panels are present before resizing, enhancing stability and user experience.
- Added the `react-resizable-panels` library to enable resizable panel functionality in the project. - Updated CLAUDE.md to include a note on using Context7 MCP for library/API documentation and configuration steps. - Refactored JSON snapshot for PostgreSQL migrations to improve formatting and consistency.
…l resizing - Adjusted the layout configuration to change default panel sizes for desktop views, setting horizontal sizes to [30, 70] for details and steps, and maintaining vertical sizes at [50, 50] for jobs and bottom. - Refactored the Dashboard component to reflect the new layout configuration, updating the logic for handling panel resizing and ensuring correct panel identifiers are used. - Enhanced comments for clarity regarding the layout structure and resizing behavior, improving maintainability and user understanding.
- Removed the useEffect for loading tokens and replaced it with a synchronous function to initialize authentication state, preventing a flash of the login page. - Updated the AuthProvider to manage token and refresh token state more efficiently using a single authState object. - Simplified login, updateAccessToken, and logout functions to directly manipulate the authState, enhancing code clarity and maintainability.
…taTable and Dashboard styling - Added updated_at timestamps to various job status updates in PostgresBaseAdapter to track changes more accurately. - Adjusted border styles in DataTable and Dashboard components for improved visual consistency and layout clarity.
- Integrated duration calculation and formatting for job steps in the StepList component. - Displayed the formatted duration next to each step, enhancing user visibility of execution times.
- Updated CLAUDE.md to include a new section on Telemetry & Observability, detailing built-in support for metrics and tracing with pluggable adapters. - Expanded the getting started guide to reference the new Telemetry documentation. - Enhanced the jobs-and-steps documentation to include observability context and nested step handling. - Updated meta.json to include telemetry in the documentation structure.
- Upgraded "@tanstack/react-virtual" to version 3.13.18 in bun.lock and package.json for improved performance. - Removed pagination parameters from metrics query schemas and related functions to simplify the metrics retrieval process. - Refactored metrics display components to utilize modals instead of panels, enhancing user experience with search functionality and improved layout. - Updated Job and Step metrics handling to align with the new modal structure, ensuring consistent data presentation.
- Updated Adapter class to support batch insertion of multiple metric records, improving performance and reducing database load. - Refactored PostgresBaseAdapter to handle batch inserts, returning the number of metrics inserted. - Enhanced LocalTelemetryAdapter to queue metrics for batch insertion after a delay, ensuring efficient database operations. - Updated telemetry tests to accommodate the new batching behavior and verify metrics insertion.
…er options - Added `jsonata` and `usehooks-ts` dependencies to `bun.lock` and `package.json` for improved functionality. - Updated `LocalTelemetryAdapter` to accept a configurable `flushDelayMs` option, allowing customization of the metrics flushing delay. - Refactored related documentation and examples to reflect the new configuration options for better clarity.
- Replaced search functionality with a JSONata expression input for filtering metrics in the MetricsModal component. - Updated MetricItem and VirtualizedMetricsList components to remove search term dependency. - Added error handling and display for JSONata evaluation results, enhancing user feedback. - Improved layout and styling for the JSONata query input and results display.
- Added export for all members from the client module in the Duron package index file, improving accessibility of client functionalities.
…ld process and API context - Bumped version of `duron` and `duron-dashboard` to `0.3.0-beta.0`. - Updated build configuration to enable minification and set production environment variables. - Refactored `ApiProvider` to accept a custom fetch function for API requests. - Introduced `PollingProvider` for configurable polling intervals in the dashboard. - Enhanced `DuronDashboard` and `Dashboard` components to support new props for theme toggling and custom class names. - Updated hooks to utilize the new polling context for dynamic polling intervals.
- Added `ctx.run()` method to execute reusable step definitions created with `createStep()`, allowing for better modularity in action handlers. - Introduced `ctx.observe` for observability context, enabling custom metrics and span data recording. - Updated documentation to include detailed examples for creating and executing reusable steps, dynamic step names, and nested steps. - Added comprehensive tests for the new step handling features, ensuring robust functionality and error handling.
- Introduced `ctx.run()` method to allow nested step definitions to call other step definitions, enabling complex workflows. - Updated documentation to include examples of composing step definitions and using `ctx.run()`. - Added tests for nested step definitions, ensuring functionality for both simple and deeply nested scenarios. - Bumped version to `0.3.0-beta.2` in `package.json` to reflect these enhancements.
- Updated `ctx.run()` method to allow inline steps to call reusable step definitions, improving modularity and flexibility in workflows. - Enhanced documentation to clarify the usage of inline steps and the `run` function. - Added tests to validate the functionality of inline steps calling step definitions, ensuring correct parent-child relationships in step execution. - Bumped version to `0.3.0-beta.4` in `package.json` to reflect these updates.
- Bumped version in `duron/package.json` to `0.3.0-beta.12`. - Improved tracer handling in `client.ts` to ensure telemetry is scoped to client instances. - Refactored `step-manager.ts` to create context-aware tracers that automatically link spans to the current trace hierarchy. - Updated tests to reflect changes in tracer behavior, ensuring external libraries can utilize the tracer without manual context management.
- Revised the description to clarify OpenTelemetry tracing support. - Updated configuration examples to demonstrate local telemetry and external export options. - Enhanced sections on span management, including creating custom spans and integrating with external libraries. - Improved best practices for metric naming and context usage in telemetry.
- Enhanced theme handling by introducing a user choice reference to prioritize explicit user preferences stored in localStorage. - Updated theme initialization logic to check for stored preferences before falling back to the default theme. - Improved theme application and synchronization with the defaultTheme prop changes. - Added utility functions for resolving and retrieving the stored theme, ensuring a more robust theme management system.
- Updated duration calculations to use milliseconds instead of seconds for improved accuracy. - Introduced a new `formatMs` function to format durations in hh:mm:ss or hh:mm:ss.mmm format. - Refactored components to utilize the new duration formatting, enhancing the display of job and step durations. - Removed deprecated functions related to seconds-based duration calculations.
- Introduced a recursive CTE method to retrieve spans for a step, including all descendant spans. - Updated the _getSpans method to handle step queries using the new recursive logic. - Refactored the WHERE clause construction for job queries, separating it from step queries. - Improved sorting logic for span results to ensure accurate ordering based on specified fields.
- Introduced `concurrencyStepLimit` to job creation options and schemas for better control over job execution. - Updated Postgres adapter to handle the new concurrency step limit in job creation and retrieval. - Enhanced job details display in the dashboard to show both group and step concurrency limits. - Updated tests to validate the new concurrency step limit functionality.
- Introduced a dynamic `description` property for jobs, allowing for contextual information to be generated at job creation time. - Updated the `ctx.telemetry` context for improved observability, replacing `ctx.observe` with `ctx.telemetry` for recording metrics and span data. - Enhanced documentation to reflect changes in job properties and telemetry context. - Added filtering capabilities for jobs based on their descriptions in the API and dashboard. - Updated tests to validate the new job description feature and its integration with existing functionalities.
- Added a `ColumnResizer` component to enable dynamic resizing of table columns in the DataTable component. - Enhanced the LayoutContext to manage column visibility and sizing states for the jobs table. - Updated the useDataTable hook to support callbacks for column visibility and sizing changes. - Integrated column visibility and sizing management into the JobsTable component, allowing for a more customizable user experience.
- Enhanced the DataTable component to support dynamic column pinning with updated styles for pinned columns. - Improved the layout of the table by wrapping it in a div to ensure proper scrolling behavior. - Updated the TableRow component to include hover and selected state styles for better user experience. - Removed unused `getCommonPinningStyles` function from the DataTable component and adjusted related styles in the data-table library. - Updated JobsTable to manage column pinning state effectively.
…eneration - Bump duron package version to 0.3.0-beta.17. - Refactor step name generation to utilize full context (input, variables, jobId, parentStepId) for dynamic naming. - Introduce StepNameContext interface for better type safety and clarity in step definitions. - Update tests to validate dynamic step naming functionality using full context.
- Fix steps.concurrency default from 10 to 100 in actions and jobs-and-steps docs - Fix server expirationTime default from 24h to 1h, add refreshTokenExpirationTime docs - Add missing TelemetryContext.startSpan() method, fix getActiveSpan() return type - Document parallel step option with examples - Document full StepNameContext properties (input, var, jobId, parentStepId) - Add missing client properties: tracer, database, flushTelemetry(), telemetry config - Add ./errors and ./telemetry subpath exports to package.json - Fix observe → telemetry naming throughout docs and CLAUDE.md - Fix stale telemetry adapter references in CLAUDE.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Core Features
Nested Steps
Steps can now create child steps with proper parent-child tracking. Child steps inherit abort signals from their parent. If a parent completes with
unawaited children, Duron throws an UnhandledChildStepsError to prevent orphaned processes.
Time Travel
Jobs can be restarted from a specific step, preserving completed sibling branches. Includes time offset adjustment so preserved steps align with the current
timeline. Supports parallel step marking so independent branches are preserved during time travel.
Reusable Step Definitions
New createStep() + ctx.run() API for defining modular, reusable steps. Step definitions can be composed — nested definitions can call other definitions.
Inline steps can also call reusable definitions.
Telemetry & Observability
Enhanced Error Handling
Typed Job Results
waitForJob and runActionAndWait now return structured JobResult / TypedJobResult with proper type safety instead of raw job objects.
Dynamic Job Descriptions
Actions can define a description function to generate contextual descriptions at job creation time. Jobs are filterable by description in the API and
dashboard.
Concurrency Step Limit
New concurrencyStepLimit option on job creation for fine-grained control over how many steps can run concurrently within a single job.
Dynamic Step Names
Step names can be generated dynamically using full context (input, variables, jobId, parentStepId) via the StepNameContext interface.
Dashboard