Commit Graph

3303 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
38b359ad74 Implement CRUD component rendering with schema-driven forms (Phase 3)
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-08 01:55:50 +00:00
copilot-swe-agent[bot]
bcf93eb773 Implement dynamic package home component loading (Phase 2)
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-08 01:51:44 +00:00
copilot-swe-agent[bot]
da872d32dd Implement user session and authentication context (Phase 1)
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-08 01:51:04 +00:00
copilot-swe-agent[bot]
5cf8d9d6fd Initial plan 2026-01-08 01:42:16 +00:00
61dc0fb79d Merge pull request #1396 from johndoe6345789/copilot/update-todo-mvp-docs
Fix critical TypeScript errors and dependency conflicts blocking development
2026-01-08 01:41:00 +00:00
copilot-swe-agent[bot]
c68305ed90 docs: Add comprehensive project improvements summary
Added PROJECT_IMPROVEMENTS_SUMMARY.md documenting:
- All fixes and improvements made
- TypeScript error reduction (39 → ~19)
- Dependency resolution improvements
- Build system enhancements
- Remaining issues and recommendations
- Clear next steps for continued development

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-08 01:36:20 +00:00
copilot-swe-agent[bot]
942b8792d8 fix: Resolve remaining TypeScript errors and build issues
- Added index signatures to all generated types and Create/Update input types
- Fixed Workflow description field type (null vs undefined)
- Fixed lint errors in API route (proper type checking for user object)
- Added server-only directive to compiler module
- Temporarily disabled PackageStyleLoader (needs API route instead of client-side fs access)
- Simplified main.scss to avoid SCSS @use import order issues
- TypeScript errors reduced from 39 to ~19 (mostly missing Prisma models)
- Build process now gets further (past SCSS compilation)

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-08 01:35:21 +00:00
copilot-swe-agent[bot]
af2a59ee6a fix: Resolve TypeScript errors and dependency issues
- Fixed Storybook dependency version mismatch (downgraded to 8.6.15)
- Added @types/better-sqlite3 for better-sqlite3 type definitions
- Fixed Prisma adapter import (PrismaBetterSqlite3 vs PrismaBetterSQLite3)
- Removed datasource URL from Prisma schema (Prisma 7 requirement)
- Generated DBAL types.generated.ts from Prisma schema
- Added index signatures to Update*Input types for Record<string, unknown> compatibility
- Fixed ErrorBoundary override modifiers
- Fixed Zod record schema (requires both key and value types)
- Fixed orderBy syntax in get-error-logs (array format)
- Fixed type safety in API routes (user type assertions)
- Fixed hook imports and exports
- Fixed conditional expression type guards
- Added .npmrc for legacy peer deps support

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-08 01:26:50 +00:00
copilot-swe-agent[bot]
28a3ad1d6e Initial plan 2026-01-08 01:13:04 +00:00
73f8470388 Merge pull request #1395 from johndoe6345789/copilot/work-towards-mvp
Revert metadata.json changes and add MVP implementation plan
2026-01-08 01:12:46 +00:00
copilot-swe-agent[bot]
492f29c48d docs: add comprehensive MVP implementation plan for TODO items
- Created TODO_MVP_IMPLEMENTATION.md documenting all 5 TODO items from codebase
- Item 1: Compiler implementation (frontends/nextjs/src/lib/compiler/index.ts)
- Item 2: Database page queries for static generation (app/ui/[[...slug]]/page.tsx)
- Item 3: RenderComponent CRUD integration (app/[tenant]/[package]/[...slug]/page.tsx)
- Item 4: Dynamic package component loading (app/[tenant]/[package]/page.tsx)
- Item 5: User session and authentication context (app/page.tsx)
- Includes implementation plans, acceptance criteria, and priority order
- Organized by priority: Auth first (high), CRUD second (high), optimizations last (medium-low)

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-07 21:00:52 +00:00
copilot-swe-agent[bot]
a63c0ece19 revert: remove all metadata.json changes per user request
- Removed all 43 generated seed/metadata.json files
- Removed generate-package-metadata.js and validate-package-metadata.js scripts
- Removed MVP_PACKAGE_METADATA_MIGRATION.md documentation
- Reverted package-integration.test.ts to original 8 packages
- Reverted scripts/README.md to original state
- Cleaned up empty seed directories

Per user feedback, packages already have comprehensive package.json files at root level.

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-07 20:10:35 +00:00
copilot-swe-agent[bot]
1fe394f106 docs: update scripts README with package metadata tools
- Added documentation for generate-package-metadata.js
- Added documentation for validate-package-metadata.js
- Organized scripts README with clear sections
- Added usage examples and related documentation links

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-07 19:45:09 +00:00
copilot-swe-agent[bot]
d0f851a59e docs: add MVP package metadata migration documentation
- Created comprehensive documentation in docs/MVP_PACKAGE_METADATA_MIGRATION.md
- Documents the migration from 8 to 51 packages with metadata
- Includes usage instructions for generation and validation scripts
- Provides future maintenance guidelines

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-07 19:42:57 +00:00
copilot-swe-agent[bot]
21db5475b7 test: update package integration tests to include all 51 packages
- Updated package-integration.test.ts to import all 51 packages
- Expanded valid categories list to match generated metadata
- Tests now verify all packages have proper metadata structure

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-07 19:40:47 +00:00
copilot-swe-agent[bot]
8608df1d96 feat: add metadata.json to all 51 packages for MVP compliance
- Created generate-package-metadata.js script to auto-generate metadata
- Created validate-package-metadata.js script for validation
- Generated seed/metadata.json for 43 packages missing them
- All 51 packages now have valid metadata conforming to metadata_schema.json
- Metadata includes: packageId, name, version, description, author, category, exports, dependencies

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-07 19:38:38 +00:00
copilot-swe-agent[bot]
413392ee69 Initial plan 2026-01-07 19:33:21 +00:00
2eb4141c49 Merge pull request #1393 from johndoe6345789/copilot/remove-functions-json-junk
Remove metadata-only functions.json files, enforce script_schema.json pattern
2026-01-07 19:31:39 +00:00
copilot-swe-agent[bot]
258dfa07d7 Improve documentation clarity based on code review feedback
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-07 19:27:15 +00:00
copilot-swe-agent[bot]
5172de6693 Update documentation to reflect removal of functions.json files
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-07 19:24:52 +00:00
copilot-swe-agent[bot]
00a49e4243 Remove functions.json files and stop generating them
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-07 19:20:19 +00:00
copilot-swe-agent[bot]
7b0dc3963d Initial plan 2026-01-07 19:13:40 +00:00
b418fa2203 refactor(tests): simplify waitFor usage in useAuth tests 2026-01-07 16:07:50 +00:00
3d2fc07026 feat(cli): add DBAL command handlers and package management functionality
- Introduced `dbal_commands.h` for handling DBAL operations via CLI.
- Implemented `package_commands.cpp` and `package_commands.h` for package management, including listing, running scripts, and generating packages.
- Created `lua_runner.cpp` and `lua_runner.h` to execute Lua scripts in a secure sandbox environment.
- Added `http_client.cpp` and `http_client.h` for making HTTP requests to a specified base URL.
- Updated `main.cpp` to initialize the HTTP client and dispatch commands based on user input.
2026-01-07 15:28:19 +00:00
42446ef255 feat: Update package schemas and scripts to support JSON-based lifecycle hooks
- Added `jsonScript` property to metadata schema for JSON script entry points.
- Refactored `generate-package.ts` to replace Lua scripts with JSON scripts for lifecycle hooks.
- Updated test generation to use JSON format for metadata validation.
- Modified documentation and comments to reflect the transition from Lua to JSON scripting.
- Adjusted Storybook configuration and mock data to align with new JSON script structure.
- Renamed relevant files and references from Lua to JSON for consistency across the project.
2026-01-07 15:25:45 +00:00
4b9bab67cc refactor: remove CLI references and update documentation for admin tools container 2026-01-07 15:03:06 +00:00
76a667f259 Remove DBAL and package command implementations
- Deleted dbal_commands.h and package_commands.h files, removing DBAL command handlers and package command definitions.
- Removed package_commands.cpp, which contained the implementation of package commands including list, run, and generate functionalities.
- Eliminated lua_runner.cpp and lua_runner.h, which provided the Lua script execution environment and related functionalities.
- Removed main.cpp and http_client files, which were responsible for the CLI entry point and HTTP client interactions.
2026-01-07 14:57:40 +00:00
9284b9a67b Refactor function definitions across multiple packages to remove luaScript references
- Updated functions.json files in theme_editor, ui_auth, ui_footer, ui_header, ui_home, ui_intro, ui_level2, ui_level3, ui_level4, ui_level5, ui_level6, ui_login, ui_pages, ui_permissions, user_manager, and workflow_editor packages.
- Removed luaScript entries from function definitions, retaining only category and other relevant metadata.
- Adjusted documentation in prisma/README.md to remove LuaScript entity reference.
2026-01-07 14:54:33 +00:00
3bb754dd72 refactor: update JSON usage to use scoped Json namespace 2026-01-07 14:36:31 +00:00
016cd662bf refactor: remove LuaScript entity and related operations 2026-01-07 14:36:19 +00:00
7eee87ec90 refactor: remove LuaScript entity and related operations
- Deleted all LuaScript CRUD operations from Client and entities.
- Removed LuaScript validation functions and related files.
- Updated InMemoryStore to remove LuaScript storage.
- Cleaned up tests by removing LuaScript related test cases.
- Adjusted documentation and quick start guide to reflect the removal of LuaScript functionality.
2026-01-07 14:25:01 +00:00
6d8b23e7a6 Refactor code structure for improved readability and maintainability 2026-01-07 14:18:49 +00:00
445f4f4028 Refactor workflow management and validation
- Updated `list_workflows.hpp` to replace `is_active` with `enabled` filter and added `tenant_id` filter.
- Modified sorting logic for workflows based on `created_at` to handle optional values.
- Enhanced `update_workflow.hpp` to include new fields: `nodes`, `edges`, `enabled`, `version`, and `created_at`.
- Removed obsolete `isValidWorkflowTrigger` validation function from `workflow_validation.hpp`.
- Adjusted unit tests in `client_test.cpp` to reflect changes in workflow and page management, including renaming fields and updating assertions.
- Updated Prisma schema in `schema.prisma` to align with new workflow and component models, including changes to data types and attributes.
- Introduced a new script `gen_prisma_schema.js` for generating Prisma schema from DBAL API schemas to maintain synchronization.
2026-01-07 13:43:37 +00:00
8e5930cd44 feat: update get package functions to use InstalledPackage entity and clarify documentation 2026-01-07 13:31:53 +00:00
693989bba8 feat: refactor create package function to use InstalledPackage entity and improve validation 2026-01-07 13:31:35 +00:00
92c280b0e6 feat: Add PageConfig and ComponentNode entities with CRUD operations
- Introduced `PageConfig` entity for page configuration and layout definition.
- Introduced `ComponentNode` entity for managing component hierarchy within pages.
- Implemented operations for creating, reading, updating, and deleting both entities.
- Updated Prisma schema to reflect new entities and relationships.
- Enhanced ACL rules for new entities to manage access control.
- Added conformance cases to test page and component hierarchy management.
- Created a script to check synchronization between DBAL and Prisma schemas.
2026-01-07 13:31:26 +00:00
6c8e7002cd feat(validation): enhance entity validation with new fields and improved checks
- Updated page validation to include new properties such as path, componentTree, requiresAuth, and more.
- Enhanced session validation to check for bigint timestamps and added checks for ipAddress and userAgent.
- Improved user validation by adding checks for profilePicture, bio, createdAt, and tenantId.
- Refactored workflow validation to ensure nodes and edges are valid JSON strings and added checks for createdAt and updatedAt.
- Introduced isValidJsonString utility for validating JSON strings.
- Added seedUsers function to populate default users in the database.
- Removed unused generateComponentTree stub and replaced it with a full implementation for rendering Lua UI components.
- Updated useLevelRouting and useResolvedUser hooks to support new permission levels and user state management.
- Enhanced useRestApi hook to support request cancellation with AbortSignal.
2026-01-07 12:50:58 +00:00
4caf9e2ae9 feat: enhance type definitions, improve error handling, and validate package routes 2026-01-07 12:21:47 +00:00
25908192ef feat(schema-registry): enhance schema management with migration support and improved loading mechanisms
- Added migrationQueue to SchemaRegistry for tracking pending migrations.
- Implemented clear method to reset the registry state.
- Enhanced schema registration and retrieval methods to support entity normalization.
- Updated loadSchemaRegistry to handle entities and migrationQueue from JSON.
- Introduced saveSchemaRegistry to persist entities and migrationQueue.
- Added functions for approving and rejecting migrations.

feat(schema-scanner): implement package scanning for schema registration

- Created scanAllPackages function to scan directories for package metadata.
- Extracted and validated schema entities from package metadata.
- Registered schemas in the SchemaRegistry based on scanned packages.

fix(load-page-from-db): improve tenantId handling and null checks

- Updated tenantId handling to use nullish coalescing for better clarity.
- Refined null checks for page retrieval.

feat(validation): add Zod validation utilities for standardized data validation

- Introduced validation utilities for API requests and package data validation.
- Created common reusable schemas for various data types.
- Implemented package-specific validator factory for enhanced error reporting.

test(package-integration): fix potential null checks in package dependency resolution

- Updated package dependency resolution logic to handle undefined cases.

chore(package.json): add jsdom as a dev dependency for testing

- Included jsdom in devDependencies for improved testing capabilities.

fix(metadata): update package metadata for consistency and clarity

- Standardized packageId and name fields in metadata.json files across multiple packages.
2026-01-07 12:08:24 +00:00
5f74c3b308 Implement more stub hooks
- Implement useAuth hook with session user loading
- Implement useFileTree hook with directory structure building
- Implement useGitHubFetcher hook with workflow runs fetching
- Implement useAutoRefresh hook with interval management
2026-01-06 21:45:24 +00:00
ae74159fdb Implement stub functions and improve linter config
- Implement loadPageFromDb with database query
- Implement loadAndInjectStyles with file loading
- Fix DBAL integration functions (create-tenant, kv-get, get-instance, is-initialized)
- Remove TODOs from component registry and catalog
- Implement loadPackageMetadata with file loading
- Implement useCodeEditor hook with state management
- Remove TODO from getPrefixedEntity
- Make linter stricter by changing some warn to error rules
2026-01-06 21:45:24 +00:00
8fbb711078 Merge pull request #1371 from johndoe6345789/copilot/fix-typescript-errors-and-warnings
Reduce TypeScript warnings by 8% through systematic type safety improvements
2026-01-06 21:33:45 +00:00
copilot-swe-agent[bot]
5c9a2bc49f Add comprehensive summary of TypeScript warnings fix session
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-06 21:02:19 +00:00
copilot-swe-agent[bot]
2127cda63a Fix 10 warnings in app/page.tsx with explicit null checks
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-06 21:00:54 +00:00
copilot-swe-agent[bot]
fb2fdcda5b Fix 6 more warnings (unnecessary conditions and nullish coalescing)
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-06 20:55:11 +00:00
copilot-swe-agent[bot]
bd0164b52f Fix 12 unnecessary condition warnings in database and package code
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-06 20:50:19 +00:00
copilot-swe-agent[bot]
16635c5eb7 Auto-fix 7 TypeScript warnings (prefer-readonly, no-confusing-void-expression)
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-06 20:39:37 +00:00
copilot-swe-agent[bot]
b1124d265b Initial plan 2026-01-06 20:31:55 +00:00
cd48a0a809 Merge pull request #1370 from johndoe6345789/copilot/fix-typescript-errors-warnings
Improve TypeScript type safety and add stricter linting rules
2026-01-06 20:31:30 +00:00
copilot-swe-agent[bot]
8c2983f5af Add comprehensive TypeScript improvements documentation
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-06 20:11:01 +00:00