Repository navigation
Refactor clipboard persistence to keep infrastructure exports factory-only - #1466
Merged
marcuscastelo merged 3 commits intoMar 24, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: marcuscastelo <27441558+marcuscastelo@users.noreply.github.com> Agent-Logs-Url: https://github.com/marcuscastelo/macroflows/sessions/2338eea6-0b34-41f0-aae5-d53d89f44d0a
Co-authored-by: marcuscastelo <27441558+marcuscastelo@users.noreply.github.com> Agent-Logs-Url: https://github.com/marcuscastelo/macroflows/sessions/2338eea6-0b34-41f0-aae5-d53d89f44d0a
Copilot
AI
changed the title
[WIP] Refactor clipboard module to only export factory functions
Refactor clipboard persistence to keep infrastructure exports factory-only
Mar 24, 2026
marcuscastelo
marked this pull request as ready for review
March 24, 2026 20:52
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the clipboard module boundary so application code depends on a domain-level persistence contract, while the infrastructure layer exposes only persistence factory functions.
Changes:
- Introduced
ClipboardPersistenceas a domain contract (src/modules/clipboard/domain/clipboardPersistence.ts). - Removed infrastructure type exports and updated infra to consume the domain contract internally.
- Updated clipboard store and its tests to import the persistence contract from the domain layer.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/modules/clipboard/infrastructure/clipboardPersistence.ts | Stops exporting the persistence type; uses the domain contract and keeps infra exports factory-only. |
| src/modules/clipboard/domain/clipboardPersistence.ts | Adds the shared ClipboardPersistence contract in the domain layer. |
| src/modules/clipboard/application/store/clipboardStore.ts | Updates the store to depend on the domain persistence contract type. |
| src/modules/clipboard/application/store/tests/clipboardStore.test.ts | Updates tests to mock the domain persistence contract directly. |
This branch was successfully deployed
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.
This refactor tightens the
clipboardmodule boundary by removing infrastructure type exports and exposing only persistence factories from the infrastructure layer. The shared persistence contract now lives outside infra so callers can depend on the abstraction without importing implementation-adjacent exports.What changed
ClipboardPersistencecontract into a dedicated domain type:src/modules/clipboard/domain/clipboardPersistence.tsclipboardPersistence.tsto consume that shared contract internally while exporting only:createLocalStoragePersistencecreateNoOpPersistenceCall-site updates
clipboardStore.tsto import the shared persistence contract from the domain layer instead of infrastructure.Resulting boundary
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:
test.supabase.co/opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node --conditions node --conditions development /home/REDACTED/work/macroflows/macroflows/node_modules/.pnpm/tinypool@1.1.1/node_modules/tinypool/dist/entry/process.js(dns block)/opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node --conditions node --conditions development /home/REDACTED/work/macroflows/macroflows/node_modules/.pnpm/tinypool@1.1.1/node_modules/tinypool/dist/entry/process.js --local k/_temp/ghcca-node/node/bin/node gpg.program(dns block)/opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node --conditions node --conditions development /home/REDACTED/work/macroflows/macroflows/node_modules/.pnpm/tinypool@1.1.1/node_modules/tinypool/dist/entry/process.js sh k/_temp/ghcca-node/node/bin/node ules/.pnpm/tinypwc(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.