feat: node pixel#99
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Copilot reviewed 139 out of 197 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const valueSchema = z | ||
| .array(z.hex()) | ||
| .default(['#000000']) | ||
| .default([]) |
There was a problem hiding this comment.
Multiple .default() calls on the same schema. The second .default([]) on line 8 will override the first .default(['#000000']) on line 7. Remove one of the defaults or use only the intended default value.
| .default([]) |
| } | ||
|
|
||
| createComponent(data: Data): pixel.Strip { | ||
| this.component?.shift; |
There was a problem hiding this comment.
Statement has no effect. This line accesses this.component?.shift but doesn't call it or use the value. Either remove this line if it's unused, or add parentheses () if you intended to call the method.
| this.component?.shift; |
| variableId: z.string().default('').default(''), | ||
| resolvedType: z.enum(['FLOAT', 'STRING', 'BOOLEAN', 'COLOR']).default('STRING').default('STRING'), | ||
| initialValue: valueSchema.default('').default(''), | ||
| debounceTime: z.number().default(100).default(100), |
There was a problem hiding this comment.
Multiple duplicate .default() calls on lines 8-11. Each field has two identical default values chained together (e.g., .default('').default('')). Remove the duplicate .default() calls as they are redundant and the second one has no effect.
| variableId: z.string().default('').default(''), | |
| resolvedType: z.enum(['FLOAT', 'STRING', 'BOOLEAN', 'COLOR']).default('STRING').default('STRING'), | |
| initialValue: valueSchema.default('').default(''), | |
| debounceTime: z.number().default(100).default(100), | |
| variableId: z.string().default(''), | |
| resolvedType: z.enum(['FLOAT', 'STRING', 'BOOLEAN', 'COLOR']).default('STRING'), | |
| initialValue: valueSchema.default(''), | |
| debounceTime: z.number().default(100), |
| frequency: { | ||
| options: Object.fromEntries(NOTES_AND_FREQUENCIES.entries()), | ||
| value: (data as BuzzData).frequency!, | ||
| value: data.frequency!, |
There was a problem hiding this comment.
[nitpick] Using non-null assertion operator ! when data should already be validated by the schema. Consider using optional chaining ?. or providing a fallback value instead of asserting non-null, as this could hide potential issues if the schema validation fails.
| value: data.frequency!, | |
| value: data.frequency ?? DEFAULT_NOTE.frequency, |
This pull request introduces several updates to the Microflow project, focusing on renaming the hardware package to
@microflow/runtime, improving documentation and onboarding, refining logging for better debugging, and adding new node support. The changes also include visual enhancements to the flow editor and some minor codebase cleanups.Package Renaming and Dependency Updates:
@microflow/hardwareto@microflow/runtimeacross the codebase, including dependencies inapps/electron-app/package.json, shared documentation, and type imports. ([[1]](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-d3b1eb748c8253bcda76af89e82e9957b3a2617b1b1c4428b2e330f611fb65beL68-R69),[[2]](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-f66cb076f79cd8d4831c07a764027462dc722a13eba933e0a783ac04ce52c6fbL43-R51),[[3]](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-2cec1ea23f1b1adc49867369f830dfe3e3ae3067f6e22d23342ef34b124c2ed5L1-R1))0.9.0inapps/electron-app/package.json. ([apps/electron-app/package.jsonL9-R9](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-d3b1eb748c8253bcda76af89e82e9957b3a2617b1b1c4428b2e330f611fb65beL9-R9))Documentation and Onboarding Improvements:
README.mdto provide clearer onboarding instructions, audience targeting, and easier getting started steps for both designers and developers. ([README.mdL3-R73](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L3-R73)).kiro/steering/tech.mdto reflect the package rename and clarify key dependencies. ([.kiro/steering/tech.mdL43-R51](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-f66cb076f79cd8d4831c07a764027462dc722a13eba933e0a783ac04ce52c6fbL43-R51))Flow Editor and Node Enhancements:
Pixelnode in the flow editor by importing and registering it inapps/electron-app/src/common/nodes.ts. ([[1]](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-5fb910ebb2649e62f3a317ea0f392e5070e612c87931629e159bd98d663ffaaeR13),[[2]](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-5fb910ebb2649e62f3a317ea0f392e5070e612c87931629e159bd98d663ffaaeR68))apps/electron-app/src/index.css. ([apps/electron-app/src/index.cssL42-R51](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-675543a888d6786320a05fc4ddd8f9de029df549523cbfcdfb0516e81f384964L42-R51))Usernode. ([apps/electron-app/src/index.cssL24-L27](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-675543a888d6786320a05fc4ddd8f9de029df549523cbfcdfb0516e81f384964L24-L27))Logging and Debugging Improvements:
apps/electron-app/src/main/ipc.tsto use clearer tags (e.g.,<request>,<send>,<error>,<create>,<spawn>,<stdout>,<stderr>, etc.) for easier debugging and tracing. ([[1]](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-d4d687196f707143ef16e17278a281d683e72aef0be60e7f57fc097d4ec4271fL50-R54),[[2]](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-d4d687196f707143ef16e17278a281d683e72aef0be60e7f57fc097d4ec4271fL90-R90),[[3]](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-d4d687196f707143ef16e17278a281d683e72aef0be60e7f57fc097d4ec4271fL104-R104),[[4]](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-d4d687196f707143ef16e17278a281d683e72aef0be60e7f57fc097d4ec4271fL161-R184),[[5]](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-d4d687196f707143ef16e17278a281d683e72aef0be60e7f57fc097d4ec4271fR194),[[6]](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-d4d687196f707143ef16e17278a281d683e72aef0be60e7f57fc097d4ec4271fL215-R228))[apps/electron-app/src/main/ipc.tsL215-R228](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-d4d687196f707143ef16e17278a281d683e72aef0be60e7f57fc097d4ec4271fL215-R228))Codebase Cleanups:
empty-module.ts) for Node.js-only packages to prevent bundling issues in the renderer process. ([apps/electron-app/src/common/empty-module.tsR1-R4](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-1040cb503d6fc514ce926631e333f00e9a8d600954f622dc0a959f613ad53e59R1-R4))[[1]](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-2cec1ea23f1b1adc49867369f830dfe3e3ae3067f6e22d23342ef34b124c2ed5L1-R1),[[2]](https://github.com/xiduzo/microflow-prototype/pull/99/files#diff-2cec1ea23f1b1adc49867369f830dfe3e3ae3067f6e22d23342ef34b124c2ed5L68-R68))These changes collectively improve the maintainability, usability, and clarity of the Microflow project for both end-users and contributors.