[WIP] Fix CSS display property and add error handling to UISystem - #1
Merged
binded-zz merged 1 commit intoMar 29, 2026
Merged
Conversation
Copilot stopped work on behalf of
binded-zz due to an error
March 29, 2026 03:34
Copilot stopped work on behalf of
binded-zz due to an error
March 29, 2026 03:44
binded-zz
marked this pull request as ready for review
March 29, 2026 03:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.
Original prompt
Issues to Fix
1. CSS Missing Display Property
The
.tax-production-windowclass insrc/UI/components/TaxProductionWindow.cssis missing thedisplay: block;property, causing the window to be invisible even whenisVisiblestate istrue.Current (Line 1-14):
Fix: Add
display: block;afterposition: fixed;2. C# UISystem Missing Error Handling
The
src/Systems/TaxProductionUISystem.csfile lacks:OnUpdate()method implementationCurrent issues:
OnUpdate()methodFix: Wrap all methods in try-catch blocks and add proper error handling.
Expected Results
After fixes:
isVisible = trueThe following is the prior conversation context from the user's chat exploration (may be truncated):
Assistant: I found the CityForge repository and retrieved some information about it. Let me provide you with what I've learned about the project and why windows aren't opening.
CityForge Project Overview
CityForge is a modding framework for Cities: Skylines 2 that provides UI integration using React and TypeScript. It's built as a Cities Skylines 2 mod with both C# backend (
CityForgeUISystem) and TypeScript/React frontend components.Key Architecture:
C# Backend (
CityForgeUISystem.cs):UISystemBaseValueBindingto communicate state between C# and UI_panelVisiblebindingReact Frontend (
Cityforge/UI/src/index.tsx):CityForgeToolbarButton: Toolbar button inGameTopLeftareaCityForgePanel: Main panel inGameareaModRegistrarinterfaceWhy Windows Can't Open
Based on the code structure, the windows likely aren't opening due to one or more of these issues:
Panel Visibility Not Toggling: The
_panelVisiblebinding needs to properly control whether the panel renders. Check if the toggle logic is correctly implemented in the button click handler.ModRegistrar Not Properly Registered: The
registerfunction must be correctly exported as the default export and the module registry must be receiving the components properly:Missing Module Entry Points: Ensure the webpack config correctly points to
src/index.tsxas the entry point for the mod ID.C# Bindings Not Initialized: The
CityForgeUISystemneeds to properly initialize the bindings so the C# side can communicate with the UI.UI System Not Instantiated: The mod system may not be creating or instantiating the
CityForgeUISystemproperly.What You Should Check:
mod.jsonconfiguration properly references the compiled DLLCityForgeUISystemtruewhen the button is clickedMIN_H,MIN_Wconstants)Would you like me to help you examine the specific
CityForgePanelimplementation or the C#OnCreate()initialization to debug further?User: fix the problem
Assistant: I'll help you fix the window opening problem. Let me first examine the current implementation to understand what's broken.
Assistant: Now let me check the structure of the repository to understand the full layout:
Assistant: Now I see the issue! Looking at the code structure, there's a critical mismatch. The
src/index.tsxis importing components that don't exist:But these files don't exist in the repository. Let me check what files are actually available:
Assistant: Now I can see the issue! The problem is in the
TaxProductionWindow.tsxcomponent. The window is rendered inside a<>(fragment), but it's missing proper CSS styling and layout that wo...This pull request was created from Copilot chat.
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.