Skip to content

Fixes AgShare cloud load and real-time log viewer#1189

Merged
richardklasens merged 12 commits intohotpatch/6.8.2from
FixAgShare
Apr 15, 2026
Merged

Fixes AgShare cloud load and real-time log viewer#1189
richardklasens merged 12 commits intohotpatch/6.8.2from
FixAgShare

Conversation

@richardklasens
Copy link
Copy Markdown
Contributor

Summary

Enhances AgShare functionality with automatic cloud field loading, improves the event logging system for real-time monitoring, and refactors guidance settings for better tool profile management.

AgShare

  • Adds automatic cloud loading of fields from AgShare, ensuring the latest version is downloaded upon field open if the feature is enabled.
  • Redesigns the AgShare settings user interface, introducing dedicated buttons for 'Auto-Upload' and 'Cloud Load' along with updated translations across multiple languages.
  • Improves connection testing feedback and button state logic within the AgShare settings.

Logging

  • Refactors log file management to limit event logs to the last 100 lines, preventing excessive file growth and improving maintainability.
  • Upgrades the event viewer to display log content in real-time, automatically scrolling to the bottom to facilitate live monitoring of system events.

Settings & Profiles

  • Relocates 'Snap Distance' and 'Snap Distance Ref' settings from general application settings to 'ToolSettings', enabling these guidance parameters to be configured and saved specifically for each tool profile.
  • Ensures that current vehicle and tool profiles are saved automatically before loading new ones, preventing potential loss of unsaved changes.

Other Improvements

  • Updates the test project's platform target to x64 for consistency with the main application.

Checklist

  • Code is tested
  • User documentation is updated
  • Developer documentation is updated
  • Release notes are updated

richardklasens and others added 11 commits April 16, 2026 00:57
- Auto-download latest field from cloud on open when AgShareAutoLoad is enabled
- FileOpenField made async; TryLoadFromAgShareAsync inserted centrally
- AgShareAutoLoad toggle button added to FormAgShareSettings
- FormAgShareSettings redesigned with clean 3-zone layout
- All AgShare UI strings moved to gStr translations (22 new keys)
- Cloud load status label added to FormJob (visible when auto-load active)
- Success/failure messages for cloud field load use translation keys

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 new gsAgShare* strings translated for all five languages.
Czech (CS) was missing gsAgShareDownloader too, added as well.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Nudge step size is tool-specific, not global. Moved from Environment
(Settings.cs) to Tool profile (ToolSettings.cs). All read/write
references updated to ToolSettings.Default. FormAllSettings rows
moved from PopulateEnvironment to PopulateTool.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Prevents unsaved in-memory changes from being lost when the user
switches to a different profile in FormLoadVehicleTool.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace line-by-line AppendText loop with File.ReadAllText + single
Text assignment, avoiding thousands of RichTextBox redraws. Extracted
shared logic into LoadLog() used by both Load and Refresh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Auto-scrolls to bottom on open and after new content arrives
- Timer (1s) appends only new file/session content without full reload
- Scroll position is preserved between ticks; no flicker

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace byte-based size trimming with line-count trimming.
CheckLogSize now keeps the last 100 lines (configurable via parameter).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Auto-Upload and Cloud Load buttons now enable Save when toggled
- Both buttons are disabled when AgShare is not activated
- Removed redundant buttonSave.Enabled from UpdateAgShareUploadButton

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixes MSB3270 architecture mismatch warning.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 97b8954072

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if (!Guid.TryParse(idText, out Guid fieldId)) return;

var downloader = new AgShareDownloader(agShareClient);
bool success = await downloader.DownloadAndSaveAsync(fieldId);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve target field directory during cloud auto-load

TryLoadFromAgShareAsync downloads by field ID and then continues opening the originally selected fileAndDirectory, but the downloader writes files under Path.Combine(fieldsDirectory, model.Name) (cloud field name). When the local folder name differs from the cloud name (for example after a rename), the download succeeds but the app still opens stale local files from the old directory. This makes the new cloud-load behavior silently incorrect for renamed/mismatched fields.

Useful? React with 👍 / 👎.

Comment thread SourceCode/GPS/Properties/ToolSettings.cs
@richardklasens richardklasens merged commit cf6ee82 into hotpatch/6.8.2 Apr 15, 2026
1 check failed
@richardklasens richardklasens deleted the FixAgShare branch April 15, 2026 23:24
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