Skip to content

SY-3673: Synnax 50.5#1941

Merged
emilbon99 merged 6 commits into
mainfrom
sy-3673-synnax-505
Feb 5, 2026
Merged

SY-3673: Synnax 50.5#1941
emilbon99 merged 6 commits into
mainfrom
sy-3673-synnax-505

Conversation

@emilbon99

@emilbon99 emilbon99 commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

Issue Pull Request

Linear Issue

SY-3673

Description

Basic Readiness

  • I have performed a self-review of my code.
  • I have added relevant, automated tests to cover the changes.
  • I have updated documentation to reflect the changes.

Greptile Overview

Greptile Summary

This PR contains bug fixes, UI improvements, and refactoring across multiple components of the Synnax system. The changes include:

Critical Bug Fixes:

  • Fixed out-of-bounds read in C++ xerrors::Error::matches() when the pattern is longer than the error type (x/cpp/xerrors/errors.h:92)
  • Fixed index out-of-bounds in Go ReadChannelValue() when accessing empty series (arc/go/runtime/state/state.go:413)
  • Fixed stateful variable type inference to unwrap channel types (arc/go/analyzer/statement/statement.go:245)
  • Fixed potential mutation bug by copying channels before assignment (arc/go/text/analyze.go:239)

UI Enhancements:

  • Refactored task controls into modular, presentational components under console/src/hardware/common/task/controls/
  • Added expandable status display with detailed error information and copy functionality
  • Created reusable Button.Copy component with clipboard integration (pluto/src/button/Copy.tsx)
  • Added status.toString() utility for consistent error formatting across the application

Test Coverage:
All critical bug fixes include comprehensive test coverage demonstrating the issues and verifying the fixes.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • All critical bug fixes have comprehensive tests, refactoring improves code organization, and changes follow established patterns
  • No files require special attention

Important Files Changed

Filename Overview
x/cpp/xerrors/errors.h Fixed out-of-bounds bug in matches() by providing end iterator to std::mismatch
arc/go/runtime/state/state.go Fixed index out-of-bounds in ReadChannelValue() by checking empty series and using len() instead of .Len()
arc/go/analyzer/statement/statement.go Fixed stateful variable type inference to unwrap channel types to their value types
x/ts/src/status/status.ts Added toString() utility for formatting status objects with details, stack traces, and timestamps
pluto/src/button/Copy.tsx Added new reusable Copy button component with clipboard integration and visual feedback
console/src/hardware/common/task/controls/Controls.tsx Created new modular task controls component with presentational/container separation
console/src/hardware/common/task/controls/Status.tsx Added expandable status display component with detailed error information

Sequence Diagram

sequenceDiagram
    participant User
    participant TaskControls
    participant StatusDisplay
    participant CopyButton
    participant ErrorHandler
    participant StatusUtils
    participant Clipboard

    User->>TaskControls: View task status
    TaskControls->>StatusDisplay: Render status with expand option
    StatusDisplay->>StatusUtils: Format status using toString()
    StatusUtils-->>StatusDisplay: Formatted error details
    StatusDisplay->>User: Show status with details

    User->>StatusDisplay: Click expand
    StatusDisplay->>StatusDisplay: Toggle expanded state
    StatusDisplay->>User: Show detailed error info

    User->>CopyButton: Click copy diagnostics
    CopyButton->>StatusUtils: Get formatted error text
    StatusUtils-->>CopyButton: Full diagnostic text
    CopyButton->>Clipboard: Write to clipboard
    Clipboard-->>CopyButton: Success
    CopyButton->>User: Show checkmark feedback

    User->>TaskControls: Click start/stop
    TaskControls->>ErrorHandler: Execute command
    alt Command fails
        ErrorHandler->>StatusUtils: Format exception
        StatusUtils-->>ErrorHandler: Formatted error
        ErrorHandler->>StatusDisplay: Display error
        StatusDisplay->>User: Show error with details
    else Command succeeds
        ErrorHandler->>StatusDisplay: Update status
        StatusDisplay->>User: Show success
    end
Loading

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

7 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@emilbon99 emilbon99 merged commit 1d47313 into main Feb 5, 2026
47 of 51 checks passed
@emilbon99 emilbon99 deleted the sy-3673-synnax-505 branch February 5, 2026 05:44

@sy-nico sy-nico left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you move this "Build-In Functions" summary table to the top?

Image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Text doesn't wrap

Image Image

}
}

func analyzeCompoundAssignment(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tried extracting a channel value to a variable. Could not get any of the compound operators to work. Is this expected behavior?

Image

ERROR [valve_toggle]: [unknown] analysis failed for arc e2379646-d005-495e-8a9b-91e0e8266e12: 17:8 error: compound assignment not supported on channels

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.

2 participants