Skip to content

fix(tak): style 0, 0 contacts as the unit filters say - #1295

Merged
rinchen merged 2 commits into
Colorado-Mesh:mainfrom
RobertMTalbot:fix/tak-direct-contact-style
Oct 20, 2026
Merged

rinchen merged 2 commits into
Colorado-Mesh:mainfrom
RobertMTalbot:fix/tak-direct-contact-style

Conversation

@RobertMTalbot

@RobertMTalbot RobertMTalbot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Companions and LXMF peers with no position get a contact at 0, 0 so ATAK can message them. It was a bare a-f-G-U-C with no team or icon, which ATAK draws as a blue CBT rectangle regardless of the relayed unit styles. It now carries the style its marker would (filters' type, team, role, colour, icon), and re-announces when styles change. Found on a device with test build 341.

Summary by CodeRabbit

  • Improvements
    • Companion, conversation-peer, and direct chat contacts now use styling consistent with their corresponding markers, including configured type, color, group, role, and icon.
    • Changes to style settings are reflected immediately in channel and contact announcements.

A companion or LXMF peer with no position gets a contact at 0, 0 so ATAK
can message it. That contact was always sent as a bare a-f-G-U-C with no
team or icon, which ATAK draws as the blue "CBT" rectangle, whatever the
relayed unit styles set. It now carries the style its marker would: the
unit filters' type, team, role, colour and icon, resolved from the cached
node or, with none heard, from its name and protocol. Changing the styles
re-announces these contacts at once.

The style XML is shared with markers (cotStyleDetail).

Found on a device with test build 341.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EHFPfW7vZXpRdR3tBBTX3r
@github-actions github-actions Bot added the bug Something isn't working as expected label Oct 18, 2026
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Repository: Colorado-Mesh/mesh-client/.coderabbit.yaml
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: dab92cc8-ced8-458a-b147-5bafe7afae87
📥 Commits

Reviewing files that changed from the base of the PR and between bd04428 and e244548.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: Colorado-Mesh/mesh-client/.coderabbit.yaml
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: b30029ce-42dc-4ff6-91b4-22f519b058ae
📥 Commits

Reviewing files that changed from the base of the PR and between 14fb3d8 and bd04428.

📒 Files selected for processing: 5
  • src/main/tak-server-manager.test.ts
  • src/main/tak-server-manager.ts
  • src/main/tak/cot-converter.ts
  • src/main/tak/geochat-cot.test.ts
  • src/main/tak/geochat-cot.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📝 Walkthrough

Direct-contact CoT events now include unit style details. TakServerManager resolves styles for conversation peers and other direct contacts, and re-announces contacts after style settings change.

Changes: TAK Contact Styling

Layer / File(s) Summary
CoT style serialization
src/main/tak/cot-converter.ts
cotStyleDetail serializes group, role, valid hex color, and icon details. meshNodeToCot now uses this helper.
Styled direct-contact events
src/main/tak/geochat-cot.ts, src/main/tak/geochat-cot.test.ts
buildDirectContactCot accepts an optional TakUnitStyle and includes its CoT type and style details. The test checks the serialized style values.
Manager style resolution and announcements
src/main/tak-server-manager.ts, src/main/tak-server-manager.test.ts
The manager resolves styles for direct contacts and uses styled contacts for peer, held-message, and announcement flows. Style updates trigger contact re-announcements.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant TakServerManager
  participant directContactCot
  participant buildDirectContactCot
  participant LocalClients
  TakServerManager->>directContactCot: Request contact for a peer or announcement
  directContactCot->>buildDirectContactCot: Build contact with resolved style
  buildDirectContactCot-->>TakServerManager: Return styled CoT event
  TakServerManager->>LocalClients: Announce contact event
Loading

Suggested reviewers: rinchen

Merge Risk: ⚪ Minimal · up to bd044

Filtered peers remain available for messaging as intended. No issue identified here prevents merging after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: applying unit-filter styles to 0,0 contacts.
Docstring Coverage Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 5 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rinchen
rinchen merged commit e9b8d11 into Colorado-Mesh:main Oct 20, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants