Skip to content

Conversation

Copy link

Copilot AI commented Dec 3, 2025

CGI server returned hardcoded # variable patterns for all machines, preventing frontend from accepting Siemens R-parameters like R5 = 5.

Changes

  • Import domain module patterns - CGI server now uses get_machine_regex_patterns() from domain module instead of hardcoded patterns
  • Add prefix field to API response - Frontend can now strip the correct prefix (R for Siemens, # for Fanuc) from user input
  • Use specific control types - Machine list now uses SIEMENS_840D and FANUC_STAR instead of generic MILL/TURN

API Response

Before:

{
  "variables": {
    "pattern": "#([1-9]|[1-9][0-9]{1,2})(?!\\d)",
    "description": "Variables #1 - #999"
  }
}

After (SIEMENS_840D):

{
  "variables": {
    "pattern": "R(\\d+)",
    "description": "Variables R1 - R999",
    "prefix": "R"
  }
}

Note

Mobile view alignment, error tab reset, and Ace editor copy issues are frontend concerns not addressed here.

Original prompt

In The mobile view after plot switch back to chanal the bottom alignment is messed up. - The Error found the title of the error tab does not go back to 0 after resolve the error. In the Ace editor on the mobile phone i can not copy the text marked can we fix this. At least the Variable panale title when set custome for siemens R5 = 5 or fanuc #5 = 5 it does not take i have to make 5 = 5 find there a better UI solution.

Created from VS Code via the GitHub Pull Request extension.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits December 3, 2025 20:17
…ix field

Co-authored-by: d-creations <99477364+d-creations@users.noreply.github.com>
…rings

Co-authored-by: d-creations <99477364+d-creations@users.noreply.github.com>
Co-authored-by: d-creations <99477364+d-creations@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix mobile view alignment and editor text copy issues Add machine-specific variable patterns and prefix to CGI API Dec 3, 2025
Copilot AI requested a review from d-creations December 3, 2025 20:26
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