Skip to content

refactor: P2 cleanup — extract shared utils, inline trivial files, safety guards#315

Open
thymikee wants to merge 3 commits intomainfrom
refactor/p2-dry-cleanup
Open

refactor: P2 cleanup — extract shared utils, inline trivial files, safety guards#315
thymikee wants to merge 3 commits intomainfrom
refactor/p2-dry-cleanup

Conversation

@thymikee
Copy link
Copy Markdown
Contributor

@thymikee thymikee commented Mar 28, 2026

Summary

Complete P2 DRY violations and cleanup from codebase review.

  • P2-1: Extract mergeDefinedFlags to shared utils/merge-flags.ts
  • P2-2: Inline trivial single-use files (json-input, session-routing, lease-context, dispatch-payload, context, etc.)
  • P2-3: Merge upload-client.ts into daemon-client.ts
  • P2-4: Extract generic parsing utilities from client-normalizers.ts to utils/parsing.ts
  • P2-5: Unify request-router handler dispatch (loop instead of if-chain)
  • P2-6: Unify daemon-client transport timeout/error handling
  • P2-7: Merge recording-telemetry.ts into recording-gestures.ts
  • P2-8: Extract repeated handler boilerplate into handler-utils.ts
  • P2-9: Add bounded cleanup for request-cancel.ts maps
  • P2-10: Add .unref() to upload-registry.ts timers
  • P2-11: Add error handling to async IIFE in transport.ts

Test plan

  • npx tsc -p tsconfig.json --noEmit passes
  • npx vitest run — all tests pass

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 28, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstackincubator.github.io/agent-device/pr-preview/pr-315/

Built to branch gh-pages at 2026-03-28 12:50 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

thymikee and others added 2 commits March 28, 2026 08:25
…lidate recording, handler utils

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…emove dead export

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant