Skip to content

Refactor POS printers architecture#1

Open
KickNext wants to merge 1 commit into
mainfrom
codex/pos-printers-clean-architecture
Open

Refactor POS printers architecture#1
KickNext wants to merge 1 commit into
mainfrom
codex/pos-printers-clean-architecture

Conversation

@KickNext
Copy link
Copy Markdown
Owner

Summary

  • Add a domain-first Dart facade with receipt paper and TSPL media helpers while keeping legacy width-based methods compatible.
  • Keep Pigeon as the internal transport layer and add a typed TSPL media host API for physical label geometry.
  • Split Android rules into focused domain helpers for status mapping, TSPL layout, UDP config, and bounded TCP discovery.
  • Refresh README, doc architecture notes, TSPL guide, example app, changelog, and license.

Verification

  • flutter analyze
  • flutter test
  • ./gradlew :pos_printers:testDebugUnitTest from example/android
  • flutter build apk --debug from example
  • dart pub publish --dry-run (0 warnings)

Notes

  • Flutter/Gradle still prints future built-in Kotlin migration warnings. Full migration is intentionally not included because the local Flutter toolchain is not yet on the required built-in Kotlin migration path.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 07feeeb18c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +33 to +35
for (candidate in startIp..endIp) {
if (emitted >= maxHosts) {
break
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Scan local-subnet hosts before enforcing host cap

This loop always starts at the beginning of the CIDR range and stops after maxHosts entries, which means large networks (for example a /16 with local IP 192.168.100.x) only probe 192.168.0.1-192.168.0.254 and never reach the segment where the printer likely resides. Because TcpPrinterDiscovery now defaults to a 254-host cap, TCP discovery can miss reachable printers on valid enterprise/VPN subnets that were previously discoverable when scanning the full range.

Useful? React with 👍 / 👎.

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