Skip to content

88: Fix empty UI when a project is opened under a different mode#92

Merged
meduzapat merged 1 commit into
developmentfrom
task_88-Project_fails_to_load_
Jul 1, 2026
Merged

88: Fix empty UI when a project is opened under a different mode#92
meduzapat merged 1 commit into
developmentfrom
task_88-Project_fails_to_load_

Conversation

@meduzapat

Copy link
Copy Markdown
Owner

Summary

Opening a project while the app's execution mode differs from the mode the
project was created in left the UI responsive with the project name in the
title bar but no devices, inputs, animations, or profiles, and no error.

Root cause

Settings::getActiveConfigPath() resolves ledspicer.conf to a mode-dependent
location (system path for Local/Interactive, projectDir/ledspicer.conf for
Portable). A project saved under one mode was read from the wrong location
under the other, so ConfigFile threw (MainWindow.cpp:645) and openProject's
catch silently wiped every collection while still enabling the tabs.

Changes

  • Origin guard: a project's mode is derived from disk; opening or saving it
    under a mismatching mode is refused with a message, before any state change.
  • Graceful failure: an unreadable/corrupt config reports the error and leaves
    the UI idle instead of showing an empty, editable project.
  • New-project validation: Apply requires a projects directory, a unique name,
    and a non-reserved ".bak" suffix, with an inline error on the name entry.
  • Add read-only Defaults::comboBoxHasId (no set_active_id state-change probe).
  • Add Settings::getModeLabels for the mismatch messages.
  • Fix a stray dirty flag / active Save with no project (color-combo refresh).

Testing

Built clean; manually verified: Local project opened in Portable (and vice
versa) is refused with the message; corrupt config lands idle; new-project
name validation for empty projects dir, duplicate, and ".bak"; mid-session
mode switch blocks save instead of duplicating the config.

Related

Follow-ups tracked separately: #89 (restrictor-only save validation),
#91 (restrictor-only load), #90 (migration / read-only config).
Closes #88

than it was created in

Task-Url: #88

A project saved under one mode (Portable vs Local) resolved its
ledspicer.conf to the other mode's location on reload, so ConfigFile
threw and openProject silently wiped the UI — project name in the title,
nothing populated.
- Derive a project's origin from disk (project-local ledspicer.conf =>
  Portable, absent => Local) and refuse to open or save it under a
  mismatching mode, with a clear message and no state change.
- On an unreadable/corrupt config, report and stay idle instead of
  entering an empty, editable project.
- Validate new project names before creating: require a projects
  directory, a unique name, and a non-reserved ".bak" suffix; flag the
  entry inline. Add read-only Defaults::comboBoxHasId for the lookup.
- Stop the color-combo refresh from marking the project dirty with no
  project open.
- Add Settings::getModeLabels for the mismatch messages.
@meduzapat meduzapat self-assigned this Jul 1, 2026
@meduzapat meduzapat added bug Something isn't working enhancement New feature or request labels Jul 1, 2026
@meduzapat meduzapat merged commit 3ead5cf into development Jul 1, 2026
1 check passed
@meduzapat meduzapat deleted the task_88-Project_fails_to_load_ branch July 1, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project fails to load (empty UI) when opened under a different mode than it was created in

1 participant