Skip to content

Rollbacked the changes made for handling the file name length#4407

Merged
shahanemahesh merged 4 commits into
masterfrom
Issue_57908
Jan 12, 2026
Merged

Rollbacked the changes made for handling the file name length#4407
shahanemahesh merged 4 commits into
masterfrom
Issue_57908

Conversation

@shahanemahesh

@shahanemahesh shahanemahesh commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

Description

Type of Change

  • Bug fix - [ ] New feature - [ ] Breaking change - [ ] Plugin update

Checklist

  • PR description clearly describes the changes
  • Target branch is correct (master for features, Releases/* for fixes)
  • Latest code from target branch merged
  • No commented/junk code included
  • No new build warnings or errors
  • All existing unit tests pass
  • New unit tests added for new functionality
  • Cross-platform compatibility verified (Windows/Linux/macOS)
  • CI/CD pipeline passes
  • Code follows project conventions (Act{Platform}{Type}, {Platform}Driver)
  • Repository objects use [IsSerializedForLocalRepository] where needed
  • Error handling uses Reporter.ToLog() pattern
  • Documentation updated for user-facing changes
  • Self-review completed and code review comments addressed

Summary by CodeRabbit

  • Improvements
    • Operation names from Swagger/OpenAPI specs now display without the previous 50-character truncation, improving identification.
    • Input dialogs allow unrestricted text entry in most cases, while folder-related prompts enforce a 30-character limit to prevent overly long folder names.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

OpenApiBase now assigns AAM.Name directly from Operation.Summary (no 50-char truncation). InputBoxWindow removed its blanket MaxLength and added conditional MaxLength (30) logic in code-behind for folder prompts only.

Changes

Cohort / File(s) Summary
OpenAPI Model Generation
Ginger/GingerAutoPilot/APIModelLib/SwaggerApi/OpenApiBase.cs
Replace truncation logic: assign AAM.Name = Operation.Summary (allowing longer/null summaries) and rely on existing fallback to OperationId if name is whitespace.
UI XAML
Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
Removed MaxLength attribute from ValueTextBox (no static 30-char limit in XAML).
UI Logic
Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml.cs
Added MAX_LENGTH = 30 constant and conditional runtime logic setting ValueTextBox.MaxLength = MAX_LENGTH when prompt text contains "Folder"; otherwise set to 0 (no limit). Applied in all Init overloads that configure the textbox.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • MeniKadosh1
  • ravirk91
  • Maheshkale447

Poem

🐰 A rabbit cheers for names set free,
Summaries stretch wide—no trims for me.
Text boxes grow where folders alone stay small,
Hoppity hops, constraints fall one and all! ✨

🚥 Pre-merge checks | ❌ 3
❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is almost entirely empty, containing only the template structure with unchecked boxes. The 'Description' section has no content explaining what changes were made or why they were reverted. Fill in the Description section to explain what previous changes are being reverted and provide the rationale. Also mark the appropriate Type of Change checkbox and update the relevant checklist items.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title references 'rollbacked' which is grammatically incorrect (should be 'rolled back'), and the phrase 'for handling the file name length' is vague about what specifically was reverted. Clarify the title to specify exactly what was reverted (e.g., 'Revert maxlength restriction changes' or similar). Also correct the grammar to use proper English.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Issue_57908

📜 Recent review details

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4b05581 and cb1a99b.

📒 Files selected for processing (2)
  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml.cs
🧰 Additional context used
📓 Path-based instructions (2)
**/{Ginger,GingerCore}/**/{*Page,*Window}.xaml.cs

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Name pages and windows following the pattern: {Feature}Page or {Feature}Window

Files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml.cs
**/*.cs

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Reporter.ToLog(eLogLevel.ERROR, message) for logging errors

Files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml.cs
🧠 Learnings (11)
📓 Common learnings
Learnt from: prashelke
Repo: Ginger-Automation/Ginger PR: 4193
File: Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/UploadMockUpWizardPage.xaml.cs:56-58
Timestamp: 2025-04-30T13:46:17.756Z
Learning: The file size limit check in UploadMockUpWizardPage.xaml.cs uses a magic number (500000 bytes) which prashelke plans to refactor later to use a named constant for better maintainability.
📚 Learning: 2025-04-30T13:46:17.756Z
Learnt from: prashelke
Repo: Ginger-Automation/Ginger PR: 4193
File: Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/UploadMockUpWizardPage.xaml.cs:56-58
Timestamp: 2025-04-30T13:46:17.756Z
Learning: The file size limit check in UploadMockUpWizardPage.xaml.cs uses a magic number (500000 bytes) which prashelke plans to refactor later to use a named constant for better maintainability.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml.cs
  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-08-26T07:40:08.345Z
Learnt from: AmanPrasad43
Repo: Ginger-Automation/Ginger PR: 4285
File: Ginger/Ginger/Actions/ActionEditPages/ActSecurityTestingEditPage.xaml:23-23
Timestamp: 2025-08-26T07:40:08.345Z
Learning: In the Ginger codebase ActSecurityTestingEditPage.xaml file, the large bottom margin of 530 on the "Acceptable Alerts" label (Margin="10,10,0,530") is intentional design choice, not an error.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml.cs
  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-12-18T05:29:42.896Z
Learnt from: AmanPrasad43
Repo: Ginger-Automation/Ginger PR: 4385
File: Ginger/GingerCoreNET/Run/Excels/ExcelNPOIOperations.cs:468-475
Timestamp: 2025-12-18T05:29:42.896Z
Learning: In the Ginger codebase, assume file extensions are lowercase (e.g., .xlsx, .xls). Do not perform case-insensitive extension checks (such as StringComparison.OrdinalIgnoreCase) when using EndsWith() or similar methods to verify file extensions; rely on lowercase comparisons or convert to lowercase first. This ensures consistency and avoids unnecessary case-insensitive comparisons across C# source files.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml.cs
📚 Learning: 2024-07-26T22:04:12.930Z
Learnt from: prashelke
Repo: Ginger-Automation/Ginger PR: 3429
File: Ginger/Ginger/AutomatePageLib/AddActionMenu/WindowExplorer/Common/WindowExplorerPage.xaml.cs:1123-1126
Timestamp: 2024-07-26T22:04:12.930Z
Learning: The user has removed an unnecessary empty line at 1123 in `WindowExplorerPage.xaml.cs` for better code compactness.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-02-24T18:12:09.279Z
Learnt from: IamRanjeetSingh
Repo: Ginger-Automation/Ginger PR: 4128
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/ActionHandlers/ActUIElementHandler.cs:322-325
Timestamp: 2025-02-24T18:12:09.279Z
Learning: For text length calculation in Ginger Automation's Web driver, only the value attribute should be used without any fallbacks to text content or inner text.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-04-30T13:21:34.994Z
Learnt from: prashelke
Repo: Ginger-Automation/Ginger PR: 4193
File: Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/AIGeneratedPreviewWizardPage.xaml.cs:131-138
Timestamp: 2025-04-30T13:21:34.994Z
Learning: In AIGeneratedPreviewWizardPage.xaml.cs, the current code checks if the response ends with triple backticks and removes them manually. This method is fragile and should be replaced with a more robust regex-based parser. The user plans to address this in a future update.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-04-08T12:31:45.924Z
Learnt from: GokulBothe99
Repo: Ginger-Automation/Ginger PR: 4169
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/ActionHandlers/ActUIElementHandler.cs:321-336
Timestamp: 2025-04-08T12:31:45.924Z
Learning: The GetTextLengthAsync method in Ginger Automation's Web driver should attempt to retrieve text from multiple sources (TextContent, InnerText, InputValue) to calculate text length, providing enhanced capabilities to read text length from different types of elements.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-11-28T05:32:43.529Z
Learnt from: CR
Repo: Ginger-Automation/Ginger PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T05:32:43.529Z
Learning: WPF UI components should be in the Ginger/ directory; console components should be cross-platform compatible

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-04-18T06:04:28.309Z
Learnt from: GokulBothe99
Repo: Ginger-Automation/Ginger PR: 4180
File: Ginger/Ginger/SourceControl/CreateNewBranch.xaml.cs:54-58
Timestamp: 2025-04-18T06:04:28.309Z
Learning: In the Ginger application, password binding for PasswordBox controls uses PasswordBox.PasswordCharProperty in the BindingHandler.ObjFieldBinding call, followed by a direct assignment to ensure the password is correctly set. This pattern is intentional and working as expected despite appearing unconventional from a standard WPF perspective.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-12-18T05:19:56.687Z
Learnt from: AmanPrasad43
Repo: Ginger-Automation/Ginger PR: 4385
File: Ginger/Ginger/Actions/ActionEditPages/ActExcelEditPage.xaml:0-0
Timestamp: 2025-12-18T05:19:56.687Z
Learning: In XAML DataTriggers, enum properties can be compared to string values because WPF automatically converts enums to strings during evaluation. This pattern is valid for XAML files like ActExcelEditPage.xaml where eExcelActionType is compared to string literals such as "ReadCellByIndex" or "GetSheetDetails". Apply this guideline broadly to XAML files that bind to enum properties; verify that such comparisons behave as expected in the specific UI components and avoid relying on string literals if the enum values change.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
🔇 Additional comments (2)
Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml (2)

27-28: Good rollback point, but ensure “unlimited” is really unlimited across target frameworks

Removing the hard-coded MaxLength from XAML is fine as long as code-behind reliably applies folder-only limits and uses the correct “no limit” value for the repo’s WPF/.NET target.


1-12: Whitespace/format-only changes look safe

Also applies to: 24-24, 30-34


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 and usage tips.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

📜 Review details

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a8ea7cb and 4b05581.

📒 Files selected for processing (2)
  • Ginger/GingerAutoPilot/APIModelLib/SwaggerApi/OpenApiBase.cs
  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.cs

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Reporter.ToLog(eLogLevel.ERROR, message) for logging errors

Files:

  • Ginger/GingerAutoPilot/APIModelLib/SwaggerApi/OpenApiBase.cs
🧠 Learnings (3)
📚 Learning: 2025-08-26T07:40:08.345Z
Learnt from: AmanPrasad43
Repo: Ginger-Automation/Ginger PR: 4285
File: Ginger/Ginger/Actions/ActionEditPages/ActSecurityTestingEditPage.xaml:23-23
Timestamp: 2025-08-26T07:40:08.345Z
Learning: In the Ginger codebase ActSecurityTestingEditPage.xaml file, the large bottom margin of 530 on the "Acceptable Alerts" label (Margin="10,10,0,530") is intentional design choice, not an error.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-12-18T05:19:56.687Z
Learnt from: AmanPrasad43
Repo: Ginger-Automation/Ginger PR: 4385
File: Ginger/Ginger/Actions/ActionEditPages/ActExcelEditPage.xaml:0-0
Timestamp: 2025-12-18T05:19:56.687Z
Learning: In XAML DataTriggers, enum properties can be compared to string values because WPF automatically converts enums to strings during evaluation. This pattern is valid for XAML files like ActExcelEditPage.xaml where eExcelActionType is compared to string literals such as "ReadCellByIndex" or "GetSheetDetails". Apply this guideline broadly to XAML files that bind to enum properties; verify that such comparisons behave as expected in the specific UI components and avoid relying on string literals if the enum values change.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-12-18T05:29:42.896Z
Learnt from: AmanPrasad43
Repo: Ginger-Automation/Ginger PR: 4385
File: Ginger/GingerCoreNET/Run/Excels/ExcelNPOIOperations.cs:468-475
Timestamp: 2025-12-18T05:29:42.896Z
Learning: In the Ginger codebase, assume file extensions are lowercase (e.g., .xlsx, .xls). Do not perform case-insensitive extension checks (such as StringComparison.OrdinalIgnoreCase) when using EndsWith() or similar methods to verify file extensions; rely on lowercase comparisons or convert to lowercase first. This ensures consistency and avoids unnecessary case-insensitive comparisons across C# source files.

Applied to files:

  • Ginger/GingerAutoPilot/APIModelLib/SwaggerApi/OpenApiBase.cs
🔇 Additional comments (1)
Ginger/GingerAutoPilot/APIModelLib/SwaggerApi/OpenApiBase.cs (1)

116-121: The removal of the 50-character truncation is safe and does not require validation. The repository save mechanism in SolutionRepository.cs automatically handles file path length constraints:

  • File names are truncated to 255 characters if necessary
  • Full paths are truncated to 260 characters (Windows MAX_PATH limit)
  • Invalid file name characters are removed via RemoveInvalidFileNameChars()

Since ApplicationAPIModel.Name is persisted through this repository framework, length limits are enforced transparently during save operations. The Name property has no explicit constraints by design—the length is controlled by the repository layer, not at the model level. There is no evidence of issues from unlimited name length in actual usage (UI display, filtering, or API consumers).

Likely an incorrect or invalid review comment.

Comment thread Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jan 7, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml.cs (4)

37-41: Avoid using a finalizer to mutate UI/global state; rename constant to convey intent

~InputBoxWindow() setting CurrentInputBoxWindow = null; is non-deterministic and can run on the finalizer thread. Prefer clearing the static in OnClosed / Closed handler (UI thread) or right after ShowDialog() returns. Also, MAX_LENGTH is ambiguous—this is specifically a folder-name constraint.

Proposed fix (cleanup on close + clearer constant)
-        private const int MAX_LENGTH = 30;
-        ~InputBoxWindow()
-        {
-            CurrentInputBoxWindow = null;
-        }
+        private const int MaxFolderNameLength = 30;
+
+        protected override void OnClosed(EventArgs e)
+        {
+            base.OnClosed(e);
+            if (ReferenceEquals(CurrentInputBoxWindow, this))
+            {
+                CurrentInputBoxWindow = null;
+            }
+        }

122-136: Don’t set ValueTextBox.MaxLength when ValueTextBox is hidden (or ensure the rule is applied to the actual input control)

In this Init overload, ValueTextBox is collapsed and input happens via xValueComboBox, so the MaxLength assignment is at best redundant and at worst misleading (future readers may think it’s enforced).


108-120: Fix null-unsafe folder detection and missing MaxLength validation across all three Init overloads

The message.Contains("Folder") pattern in lines 118, 125, and 141 is brittle and unsafe:

  • message can be null → throws NullReferenceException
  • String matching breaks with localization or wording changes
  • MaxLength is set but never enforced; OKButton_Click doesn't validate that ValueTextBox.Text (or pre-filled/bound values) stays within the limit
Proposed fix (centralize rule + null-safe + enforce on OK)
+        private bool IsFolderPrompt(string message)
+        {
+            return !string.IsNullOrEmpty(message) &&
+                   message.IndexOf("Folder", StringComparison.OrdinalIgnoreCase) >= 0;
+        }
+
+        private void ApplyMaxLength(string message)
+        {
+            ValueTextBox.MaxLength = IsFolderPrompt(message) ? MAX_LENGTH : 0;
+        }
+
         public void Init(string title, string message, ref string Value, bool isMultiline)
         {
             if (!isMultiline)
             {
                 ValueTextBox.TextWrapping = TextWrapping.NoWrap;
                 ValueTextBox.AcceptsReturn = false;
             }
             winTitle.Content = title;
             MessageLabel.Text = message;
             ValueTextBox.Text = Value;
-            ValueTextBox.MaxLength = message.Contains("Folder") ? MAX_LENGTH : 0;
+            ApplyMaxLength(message);
             ValueTextBox.Focus();
         }

Apply the same ApplyMaxLength(message) call in the other two Init overloads (lines 125 and 141).

         private void OKButton_Click(object sender, RoutedEventArgs e)
         {
+            if (ValueTextBox.Visibility == Visibility.Visible &&
+                ValueTextBox.MaxLength > 0 &&
+                ValueTextBox.Text != null &&
+                ValueTextBox.Text.Length > ValueTextBox.MaxLength)
+            {
+                Reporter.ToUser(eUserMsgKey.ValueIssue, $"Value cannot exceed {ValueTextBox.MaxLength} characters");
+                ValueTextBox.Focus();
+                return;
+            }
             if (xValueComboBox.Visibility == System.Windows.Visibility.Visible)
             {
                 value = (string)xValueComboBox.SelectedValue;
             }
             else
             {
                 value = ValueTextBox.Text;
             }
             OK = true;
             this.Close();
         }

138-146: Validate folder path length before accepting the dialog

WPF's MaxLength property only prevents keyboard input and does not auto-truncate or prevent binding updates from setting longer values. When ObjFieldBinding establishes a TwoWay binding with PropertyChanged trigger, if the source object's property already contains a folder path exceeding 30 characters, it displays in the TextBox without truncation, and OKButton_Click accepts it without validation. Add validation in OKButton_Click to reject or truncate over-length folder paths before Close(), or enforce the constraint at the source object level.

📜 Review details

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4b05581 and cb1a99b.

📒 Files selected for processing (2)
  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml.cs
🧰 Additional context used
📓 Path-based instructions (2)
**/{Ginger,GingerCore}/**/{*Page,*Window}.xaml.cs

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Name pages and windows following the pattern: {Feature}Page or {Feature}Window

Files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml.cs
**/*.cs

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Reporter.ToLog(eLogLevel.ERROR, message) for logging errors

Files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml.cs
🧠 Learnings (11)
📓 Common learnings
Learnt from: prashelke
Repo: Ginger-Automation/Ginger PR: 4193
File: Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/UploadMockUpWizardPage.xaml.cs:56-58
Timestamp: 2025-04-30T13:46:17.756Z
Learning: The file size limit check in UploadMockUpWizardPage.xaml.cs uses a magic number (500000 bytes) which prashelke plans to refactor later to use a named constant for better maintainability.
📚 Learning: 2025-04-30T13:46:17.756Z
Learnt from: prashelke
Repo: Ginger-Automation/Ginger PR: 4193
File: Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/UploadMockUpWizardPage.xaml.cs:56-58
Timestamp: 2025-04-30T13:46:17.756Z
Learning: The file size limit check in UploadMockUpWizardPage.xaml.cs uses a magic number (500000 bytes) which prashelke plans to refactor later to use a named constant for better maintainability.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml.cs
  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-08-26T07:40:08.345Z
Learnt from: AmanPrasad43
Repo: Ginger-Automation/Ginger PR: 4285
File: Ginger/Ginger/Actions/ActionEditPages/ActSecurityTestingEditPage.xaml:23-23
Timestamp: 2025-08-26T07:40:08.345Z
Learning: In the Ginger codebase ActSecurityTestingEditPage.xaml file, the large bottom margin of 530 on the "Acceptable Alerts" label (Margin="10,10,0,530") is intentional design choice, not an error.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml.cs
  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-12-18T05:29:42.896Z
Learnt from: AmanPrasad43
Repo: Ginger-Automation/Ginger PR: 4385
File: Ginger/GingerCoreNET/Run/Excels/ExcelNPOIOperations.cs:468-475
Timestamp: 2025-12-18T05:29:42.896Z
Learning: In the Ginger codebase, assume file extensions are lowercase (e.g., .xlsx, .xls). Do not perform case-insensitive extension checks (such as StringComparison.OrdinalIgnoreCase) when using EndsWith() or similar methods to verify file extensions; rely on lowercase comparisons or convert to lowercase first. This ensures consistency and avoids unnecessary case-insensitive comparisons across C# source files.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml.cs
📚 Learning: 2024-07-26T22:04:12.930Z
Learnt from: prashelke
Repo: Ginger-Automation/Ginger PR: 3429
File: Ginger/Ginger/AutomatePageLib/AddActionMenu/WindowExplorer/Common/WindowExplorerPage.xaml.cs:1123-1126
Timestamp: 2024-07-26T22:04:12.930Z
Learning: The user has removed an unnecessary empty line at 1123 in `WindowExplorerPage.xaml.cs` for better code compactness.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-02-24T18:12:09.279Z
Learnt from: IamRanjeetSingh
Repo: Ginger-Automation/Ginger PR: 4128
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/ActionHandlers/ActUIElementHandler.cs:322-325
Timestamp: 2025-02-24T18:12:09.279Z
Learning: For text length calculation in Ginger Automation's Web driver, only the value attribute should be used without any fallbacks to text content or inner text.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-04-30T13:21:34.994Z
Learnt from: prashelke
Repo: Ginger-Automation/Ginger PR: 4193
File: Ginger/Ginger/ApplicationModelsLib/POMModels/POMWizardLib/LearnWizard/AIGeneratedPreviewWizardPage.xaml.cs:131-138
Timestamp: 2025-04-30T13:21:34.994Z
Learning: In AIGeneratedPreviewWizardPage.xaml.cs, the current code checks if the response ends with triple backticks and removes them manually. This method is fragile and should be replaced with a more robust regex-based parser. The user plans to address this in a future update.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-04-08T12:31:45.924Z
Learnt from: GokulBothe99
Repo: Ginger-Automation/Ginger PR: 4169
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/ActionHandlers/ActUIElementHandler.cs:321-336
Timestamp: 2025-04-08T12:31:45.924Z
Learning: The GetTextLengthAsync method in Ginger Automation's Web driver should attempt to retrieve text from multiple sources (TextContent, InnerText, InputValue) to calculate text length, providing enhanced capabilities to read text length from different types of elements.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-11-28T05:32:43.529Z
Learnt from: CR
Repo: Ginger-Automation/Ginger PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T05:32:43.529Z
Learning: WPF UI components should be in the Ginger/ directory; console components should be cross-platform compatible

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-04-18T06:04:28.309Z
Learnt from: GokulBothe99
Repo: Ginger-Automation/Ginger PR: 4180
File: Ginger/Ginger/SourceControl/CreateNewBranch.xaml.cs:54-58
Timestamp: 2025-04-18T06:04:28.309Z
Learning: In the Ginger application, password binding for PasswordBox controls uses PasswordBox.PasswordCharProperty in the BindingHandler.ObjFieldBinding call, followed by a direct assignment to ensure the password is correctly set. This pattern is intentional and working as expected despite appearing unconventional from a standard WPF perspective.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
📚 Learning: 2025-12-18T05:19:56.687Z
Learnt from: AmanPrasad43
Repo: Ginger-Automation/Ginger PR: 4385
File: Ginger/Ginger/Actions/ActionEditPages/ActExcelEditPage.xaml:0-0
Timestamp: 2025-12-18T05:19:56.687Z
Learning: In XAML DataTriggers, enum properties can be compared to string values because WPF automatically converts enums to strings during evaluation. This pattern is valid for XAML files like ActExcelEditPage.xaml where eExcelActionType is compared to string literals such as "ReadCellByIndex" or "GetSheetDetails". Apply this guideline broadly to XAML files that bind to enum properties; verify that such comparisons behave as expected in the specific UI components and avoid relying on string literals if the enum values change.

Applied to files:

  • Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml
🔇 Additional comments (2)
Ginger/GingerCore/GeneralLib/InputBoxWindow.xaml (2)

27-28: Good rollback point, but ensure “unlimited” is really unlimited across target frameworks

Removing the hard-coded MaxLength from XAML is fine as long as code-behind reliably applies folder-only limits and uses the correct “no limit” value for the repo’s WPF/.NET target.


1-12: Whitespace/format-only changes look safe

Also applies to: 24-24, 30-34

@shahanemahesh
shahanemahesh merged commit c673073 into master Jan 12, 2026
23 of 26 checks passed
@shahanemahesh
shahanemahesh deleted the Issue_57908 branch January 12, 2026 06:32
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