-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refactor: refactoring core #2307
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
base: develop
Are you sure you want to change the base?
Conversation
045cfeb to
a823774
Compare
8eb3533 to
e4bac47
Compare
67db766 to
792f8d4
Compare
|
Deployment Status: ✅ Success |
e517ca8 to
e2cb199
Compare
|
Deployment Status: ❌ Failed |
e2cb199 to
5642f24
Compare
|
Deployment Status: ✅ Success |
fe5003c to
a8b6afb
Compare
|
Deployment Status: ❌ Failed |
|
Deployment Status: ✅ Success |
|
Deployment Status: ❌ Failed |
1 similar comment
|
Deployment Status: ❌ Failed |
e4a5d53 to
b36a914
Compare
|
Deployment Status: ✅ Success |
7 similar comments
|
Deployment Status: ✅ Success |
|
Deployment Status: ✅ Success |
|
Deployment Status: ✅ Success |
|
Deployment Status: ✅ Success |
|
Deployment Status: ✅ Success |
|
Deployment Status: ✅ Success |
|
Deployment Status: ✅ Success |
- Integrated field type icons into the RecordDetailCard component for improved visual representation of fields. - Updated the layout to include icons alongside field names, enhancing user experience and clarity in data presentation. These changes improve the usability of the playground by providing a more informative and visually appealing record detail view.
…taPage - Updated TableMetaPage to use the Link component from react-router instead of the navigate function for record navigation. - Removed the handleOpenRecord function and adjusted the button to a Link for improved routing and user experience. - This change enhances the clarity of navigation within the playground component, aligning with best practices for routing in React applications.
- Implemented support for cross-base links in computed field updates, ensuring that updates to linked records across different bases are correctly reflected. - Added logic to register referenced tables and handle symmetric links, improving the integrity of data relationships. - Enhanced e2e tests to cover scenarios involving cross-base links, verifying that updates propagate correctly between linked records in different bases. These changes significantly improve the functionality and reliability of computed field updates in scenarios involving multiple bases.
- Adjusted expectations in computed field update tests to reflect changes in the number of steps in various computed plans. - Updated inline snapshots to ensure they accurately represent the computed steps after recent optimizations. - Enhanced assertions to verify the presence of rollup and symmetric link steps in computed plans, improving test coverage and reliability. These changes ensure that the tests accurately validate the behavior of computed field updates in different scenarios.
…ox metadata - Introduced a new optimization for collapsing multi-level same-table batches into a single step, improving the efficiency of computed updates. - Enhanced the ComputedUpdateOutbox to store detailed metadata in the dirty_stats column, including change type and impact, to better support seed tasks. - Updated the SameTableBatchQueryBuilder to include a dirty filter for improved handling of dirty records during batch updates. - Adjusted various components to ensure compatibility with the new batch optimization and metadata structure, enhancing overall functionality and reliability. These changes significantly improve the performance and traceability of computed field updates, particularly in scenarios involving complex formula chains.
…tency - Modified the SQL output in the ComputedFieldUpdater test to use `to_jsonb` for the `col_link` field, ensuring compatibility with recent changes in data handling. - Enhanced end-to-end tests to validate the computed plan steps after updates, improving the accuracy of test assertions and inline snapshots. These updates ensure that the tests reflect the latest implementation details and maintain the integrity of computed field updates.
- Added `ITableRepository` and `ComputedFieldBackfillService` to the `ComputedUpdateWorker` tests to improve test coverage and functionality. - Updated test cases to utilize the new dependencies, ensuring that the worker's behavior is accurately validated in various scenarios. - Enhanced the outbox mock to include methods for enqueueing seed tasks and field backfills, reflecting recent changes in the worker's implementation. These updates ensure that the tests are aligned with the latest architecture and improve the reliability of computed field update validations.
- Updated `FieldCreatedRealtimeProjection` and `ViewColumnMetaUpdatedRealtimeProjection` to inject `tableRepository` and `tableMapper`, allowing projections to fetch table data directly instead of relying on event snapshots. - Removed snapshot checks and adjusted event handling logic to ensure that projections can handle tables created before realtime was enabled. - Enhanced `TableUpdateFlow` to streamline event publishing by removing the need for snapshot enrichment, improving overall performance and clarity in event processing. - Introduced new specifications and visitor patterns to generate domain events based on table mutations, ensuring that projections remain consistent with the latest architecture. - Added tests to validate the new behavior and ensure that projections correctly handle table data retrieval and event generation.
…ata in field types - Enhanced field types (CreatedTimeField, LastModifiedTimeField, CreatedByField, LastModifiedByField, AutoNumberField) to include metadata indicating persistence as generated columns. - Updated the PostgresTableRepository to rehydrate generated column metadata for system fields during table creation. - Introduced GeneratedColumnMeta class to manage metadata related to generated columns, ensuring consistent handling across field types. - Added tests to validate the correct behavior of generated column persistence and metadata retrieval. These changes improve the handling of generated columns, enhancing the integrity and functionality of the table schema and field definitions.
- Added support for realtime record subscriptions in PlaygroundRecordRoute and PlaygroundTableRoute, allowing for live updates of record data. - Introduced RealtimeRecordCard and RealtimeStatusBadge components to display the status and details of realtime records. - Enhanced the caching mechanism to sync realtime data with TanStack Query, ensuring that updates are reflected in the UI seamlessly. - Updated TableMetaPage to include realtime record snapshots, status, and error handling, improving the overall user experience in the playground. These changes significantly enhance the interactivity and responsiveness of the playground, providing users with real-time insights into record data.
- Modified snapshot tests for various array functions to reflect changes in formatted and raw values, ensuring they are set to empty or null as appropriate. - Adjusted expected results in the snapshots to align with the new output structure, improving the accuracy of test validations. These updates enhance the reliability of the tests by ensuring they accurately represent the current behavior of array functions.
- Introduced a new ComputedTasksPanel component for displaying computed task statuses and details. - Created API routes for managing computed tasks, including retrying tasks, fetching dead letters, and handling outbox tasks. - Updated PlaygroundShell to include a link to the new Computed Tasks section, enhancing navigation within the playground. - Enhanced the database schema to support trace data for computed updates, improving tracking and debugging capabilities. These changes significantly enhance the functionality of the playground by providing users with a comprehensive view and management options for computed tasks.
…handling - Added a non-blocking worker dispatch for retrying tasks in the computed tasks API, allowing for immediate response while processing tasks in the background. - Introduced a yieldToEventLoop function in the SSE handler to improve responsiveness by yielding control back to the event loop, enhancing the streaming experience. - Updated the IDomainEvent interface and related event classes to include an optional requestId for better tracing of request flows through the event bus. These changes improve the efficiency and traceability of task management and event handling within the playground, enhancing overall user experience.
…uted updates When a field in base A is updated and affects a formula that is referenced by a link field in base B (as its lookupFieldId), the link title in base B should also be updated. Previously, loadFields only loaded fields from the current base, so cross-base link fields were excluded from fieldsById and thus filtered out by filterComputedFields. Changes: - Modified loadReferenceEdges to also collect cross-base field metadata - Added cross-base fields to fieldsById in the load method - Added e2e test covering value change -> formula -> cross-base link title cascade Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <[email protected]> Co-Authored-By: Happy <[email protected]>
- Introduced several new skills for the Teable v2 framework, including `teable-v2-devtools`, `teable-v2-package-guide`, `teable-v2-table-template`, and `teable-v2-test-debug`, providing comprehensive documentation and usage guidelines. - Updated the GitHub Actions workflow to improve unit testing processes, including parallel execution and enhanced reporting. - Added new end-to-end tests for computed fields, formulas, and link operations, ensuring robust validation of functionality across various scenarios. - Enhanced the Playground components to support new features and improve user experience, including better handling of explain results and metadata display. These changes significantly enhance the testing capabilities and documentation for the Teable v2 framework, improving developer experience and code reliability.
…ter and unique prefix - Introduced a global field counter to ensure unique field IDs across instances. - Modified the field ID generation logic to include a unique prefix based on the current timestamp and a random string, enhancing uniqueness and traceability. These changes improve the reliability of field ID generation in the computed matrix, preventing potential conflicts in ID assignments.
- Modified the GitHub Actions workflow to run unit tests for each package in parallel, improving test execution efficiency. - Enhanced the field ID generation in the computed matrix by replacing the global counter with a more reliable method using FieldId, ensuring unique field IDs without conflicts. These changes optimize the testing process and improve the reliability of field ID generation.
- Updated the GitHub Actions workflow to include a filter for package installation, optimizing the installation process for specific packages. - Enhanced the report merging step to create an empty report when no test results are available, ensuring consistent output and preventing errors during report generation. - Modified end-to-end test descriptions for clarity and consistency, improving the readability of test cases. These changes improve the efficiency of the testing workflows and enhance the robustness of report generation in the CI/CD pipeline.
…leQueryService - Introduced new test files for Realtime projections, covering various event handling scenarios including record creation, updates, and deletions. - Added tests for TableQueryService to validate table retrieval by ID, existence checks, and error handling. - Enhanced existing tests with improved error handling and repository interaction validations. These additions significantly strengthen the test coverage for critical components, ensuring robust functionality and reliability in the system.
- Updated assertions in the end-to-end tests for the cross-table chain matrix to reflect the correct expected values, changing from nested arrays to single values for clarity and accuracy. - Enhanced the validation logic in the `getExpectedResult` function to handle string concatenation based on depth, ensuring expected results are correctly formatted for various scenarios. These changes improve the reliability of the tests and ensure they accurately reflect the intended behavior of the computed matrix functionality.
- Updated test scenarios in the end-to-end formula tests to provide clearer descriptions and include field types for better context. - Improved the specificity of formulas and expectations across various test cases, ensuring they accurately reflect the intended functionality and edge cases. - This refactor enhances the readability and maintainability of the test suite, making it easier to understand the purpose and requirements of each test.
Adds SET_LOCALE/SET_TIMEZONE support in core and postgres SQL builder, and broadens formula/computed e2e coverage with updated snapshots.
Eliminated the tests-passed job from the GitHub Actions workflow, streamlining the CI process by removing unnecessary steps related to report merging and summary creation. This change simplifies the workflow while maintaining essential testing functionality.
…elds - Changed the `required` property of several schema rules from `true` to `false`, allowing for more flexibility in schema definitions. - Updated the `SchemaChecker` logic to yield warnings for optional rules when dependencies are not satisfied, enhancing error handling. - Modified the `StatusBadge` component to reflect a more accurate status label for errors, changing 'Error' to 'Fatal'. - Improved test coverage for schema validation scenarios, ensuring that both required and optional fields are correctly validated. These changes enhance the schema validation process, making it more adaptable to various use cases while maintaining clarity in error reporting.
- Introduced a static Map to track and increment unique counters for generated rule IDs in the ReferenceRule class, ensuring distinct identifiers for each reference entry. - Updated the buildRuleId method to incorporate the counter, allowing for better differentiation of rule IDs based on their usage frequency. - Modified the TableId schema to enforce a regex pattern for prefixed IDs, enhancing validation for table identifiers. These changes improve the uniqueness and traceability of reference rules while strengthening the validation of table IDs.
- Added a new package `@teable/v2-field-dependency-core` to manage field dependencies, including edge-building and parsing functionalities. - Implemented various utility functions for constructing dependency edges, parsing options, and extracting condition field IDs. - Created comprehensive tests for the new functionalities, ensuring robust validation of field dependency chains and edge cases. - Enhanced existing packages to integrate with the new field dependency core, improving overall architecture and maintainability. These changes establish a foundational structure for managing field dependencies, facilitating better data relationships and computations across the system.
- Updated the FieldDependencyGraph class to include error handling for missing lookupOptions, options, and conditionalOptions in various field types. - Modified the findAffectedFieldIds method to accept a baseId parameter, ensuring accurate filtering of fields based on their base ID. - Adjusted SQL queries to include checks for deleted fields and their associated base IDs, improving data integrity in dependency resolution. These changes enhance the robustness of field dependency management by ensuring that all required options are validated before processing, thereby preventing potential runtime errors.
d756380 to
a35bf61
Compare
…k field representation - Added a new `LinkFieldLabel` component to display link fields with their relationship and direction labels. - Integrated `LinkFieldLabel` into various components including `MetaCheckPanel`, `PlaygroundRecordRoute`, `RecordCreateDialog`, and `SchemaCheckPanel` to improve the user interface for link fields. - Updated related components to handle optional relationship and direction properties, ensuring accurate display of link field information. These changes enhance the clarity and usability of link fields across the application, providing users with better context and understanding of their relationships.
No description provided.