-
Notifications
You must be signed in to change notification settings - Fork 0
Phase 1: Foundation packages for monorepo restructure #56
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
Conversation
Co-authored-by: tikazyq <3393101+tikazyq@users.noreply.github.com>
….2 & 1.3) Co-authored-by: tikazyq <3393101+tikazyq@users.noreply.github.com>
…hase 1.4 & 1.6) Co-authored-by: tikazyq <3393101+tikazyq@users.noreply.github.com>
Co-authored-by: tikazyq <3393101+tikazyq@users.noreply.github.com>
Co-authored-by: tikazyq <3393101+tikazyq@users.noreply.github.com>
Co-authored-by: tikazyq <3393101+tikazyq@users.noreply.github.com>
There was a problem hiding this 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 establishes foundational infrastructure for the devlog monorepo by adding:
- Shared TypeScript configurations for React and Node.js packages
- Shared ESLint configurations with React, Node.js, and base presets
- Shared test utilities including factories, mocks, and setup helpers
- A new
@codervisor/devlog-sharedpackage containing shared types, constants, and utility functions - A Go-based collector package structure with types, models, and file watching capabilities
Reviewed Changes
Copilot reviewed 44 out of 93 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tools/tsconfig/*.json |
Shared TypeScript configurations for base, React, and Node.js projects |
tools/eslint-config/*.js |
Shared ESLint configurations with TypeScript, React, and accessibility rules |
tools/test-utils/src/* |
Test factories, mocks, and setup utilities for consistent testing |
packages/shared/src/* |
Core shared types (devlog, agent, project), constants, and utility functions |
packages/collector/pkg/* |
Go types and models for agent event collection |
packages/collector/internal/* |
Go watcher implementation with platform-specific OS detection |
pnpm-workspace.yaml |
Added tools/* to workspace packages |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| 'react/function-component-definition': [ | ||
| 'error', | ||
| { | ||
| namedComponents: 'arrow-function', | ||
| unnamedComponents: 'arrow-function', | ||
| }, | ||
| ], |
Copilot
AI
Nov 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The react/function-component-definition rule enforcing arrow functions contradicts the coding guidelines which show functional components using export function syntax. The guidelines example shows export function DevlogCard({ ... }), not arrow functions. This rule should allow function declarations for named components to align with the project's patterns.
| if (diffSec < 60) { | ||
| return 'just now'; | ||
| } else if (diffMin < 60) { | ||
| return `${prefix}${diffMin} minute${diffMin !== 1 ? 's' : ''} ${suffix}`.trim(); |
Copilot
AI
Nov 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The relativeTime function has duplicated string template logic for pluralization across multiple conditions (lines 96, 98, 100, 102, 104). Consider extracting a helper function like pluralize(count, unit) to reduce duplication and improve maintainability.
| if (process.env.NODE_ENV === 'development' || process.env.LOG_LEVEL === 'debug') { | ||
| console.debug(formatMessage('debug', message, context)); | ||
| } |
Copilot
AI
Nov 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logger uses console.debug which violates the ESLint rule no-console defined in the base config (line 73 of tools/eslint-config/base.js). While the Node.js config allows console in server environments, this shared package may be used in web contexts. Consider using a proper logging abstraction or documenting this exception.
Implements Phase 1 of the project folder restructure spec (
20251101/001-project-folder-restructure), establishing foundational packages with zero-dependency shared types, consistent tooling configurations, and testing infrastructure.New Packages
@codervisor/devlog-shared(0.0.1)Zero-dependency shared library:
@codervisor/eslint-config(0.0.1)Modular ESLint configurations:
@codervisor/tsconfig(0.0.1)Composable TypeScript configs:
@codervisor/test-utils(0.0.1)Testing utilities:
createMockDevlogEntry(),createMockProject(),createMockAgentSession()setupTest()with automatic cleanup and ID counter reset@codervisor/devlog-collector(0.1.0)Renamed
collector-go→collector, added package.json for monorepo script integration.Usage Example
Deferred
Security
Fixed ReDoS vulnerability in email validation regex (replaced
[^\s@]+@[^\s@]+\.[^\s@]+with character class bounds).Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
checkpoint.prisma.io/usr/local/bin/node /home/REDACTED/work/devlog/devlog/node_modules/.pnpm/prisma@6.15.0_magicast@0.3.5_typescript@5.8.3/node_modules/prisma/build/child {"product":"prisma","version":"6.15.0","cli_install_type":"local","information":"","local_timestamp":"2025-11-01T07:09:49Z","project_hash":"13c1768f","cli_path":"/home/REDACTED/work/devlog/devlog/node_modules/prisma/build/index.js","cli_path_hash":"8ec3fa5d","endpoint":"REDACTED","disable":false,"arch":"x64","os":"linux","node_version":"v20.19.5","ci":true,"ci_name":"GitHub Actions","command":"generate","schema_providers":["postgresql"],"schema_preview_features":[],"schema_generators_providers":["prisma-client-js"],"cache_file":"/home/REDACTED/.cache/checkpoint-nodejs/prisma-8ec3fa5d","cache_duration":43200000,"remind_duration":172800000,"force":false,"timeout":5000,"unref":true,"child_path":"/home/REDACTED/work/devlog/devlog/node_modules/.pnpm/prisma@6.15.0_magicast@0.3.5_typescript@5.8.3/node_modules/prisma/build/child","client_event_id":"","previous_client_event_id":"","check_if_update_available":true}(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
let's continue with Phase 1
[Chronological Review: The conversation began with the user requesting an analysis of the current project structure focused on the web app. The user then shifted to a broader request for analyzing the project structure to identify gaps and optimization opportunities. Following this, the user requested to create a specification for restructuring the project folder, noting that "go-collector" is also part of the project. The user then indicated a desire to continue with "Phase 1," suggesting a structured approach to the project restructuring.][Intent Mapping:
[Technical Inventory:
[Code Archaeology: No specific files or code changes were discussed in detail during this conversation.]
[Progress Assessment:
[Context Validation: All critical information for continuation is captured, including user requests for analysis and restructuring, as well as the inclusion of the go-collector component.]
[Recent Commands Analysis:
1. Conversation Overview: - Primary Objectives: - "please analyze current project structure focused on web app" - "please analyze current project structure. i want understand the gap and how to optimize it" - "let's create a spec for project folder restructure. please be noted that go-collector is also part of the project" - "let's continue with Phase 1" - Session Context: The conversation has revolved around analyzing and optimizing the project structure, with a focus on creating a specification for restructuring. - User Intent Evolution: The user initially sought analysis, then moved towards creating a restructuring plan, indicating a structured approach to the project.- Technical Foundation:
- Repository: devlog
- Owner: codervisor
- Current branch: develop
- Default branch: main
- Mention of "go-collector" as part of the project.
- Codebase Status:
- No specific files or code changes were discussed in detail during this conversation.
- Problem Resolution:
- Issues Encountered: None explicitly mentioned, but the user is looking to identify gaps in the project structure.
- Solutions Implemented: The user is in the process of drafting a restructuring specification.
- Debugging Context: No ongoing troubleshooting efforts were noted.
- Lessons Learned: The importance of structured analysis and planning for project optimization.
- Progress Tracking:
- Completed Tasks: User has outlined the need for project structure analysis and expressed intent to create a restructuring specification.
- Partially Complete Work: The specification for the project folder restructure is pending completion, as well as the execution of Phase 1.
- Active Work State:
- Current Focus: Preparing to assist with the continuation of Phase 1 of the project restructuring.
- Recent Context: The user has expressed a desire to move forward with the restructuring process.
- Working Code: No specific code snippets were discussed recently.
- Immediate Context: The user was ready to proceed with the first phase of restructuring when the summary was triggered.
- Recent Operations:
- Last Agent Commands: User commands focused on analyzing project structure and initiating a restructuring specification.
- Tool Results Summary: No specific tool results were generated as the conver...
Created from VS Code via the GitHub Pull Request extension.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.