Chosen preset ID is not retained beyond initial workspace build
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 3
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
In each `workspace_build` entry that is added when a user creates a workspace, their chosen preset ID (if any) is set in the `template_version_preset_id` column.
For all subsequent transitions of that workspace (stop, start, etc), that `template_version_preset_id` column will be `null` because we don't set it explicitly.
Now, this is technically _the truth™ _ because the preset wasn't volitionally chosen by the user, and the parameters are still maintained, so it's fine™. BUT, when we want to show the selected preset for a workspace after one of these transitions (say a workspace is stopped and then started again), we will have no record of which preset ID was chosen last.
An idea would be to add a virtual column on the `workspaces` table which finds the latest workspace build with a non-null `template_version_preset_id` value. This would even work once we allow a user to change their preset after the fact when editing a workspace, since that would be another `workspace_builds` entry with a non-null `template_version_preset_id` field.
This is not a problem right now because preset selection is kind of _fire and forget_ (i.e. it configures the defined params and a user can never see which preset they chose). Once we need to show which preset was chosen and allow it to be changed, such as pre-selected it in the drop-down list of available presets, then we'd need this information.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Es werden keine Dateien, Tests oder Einstiegspunkte genannt. Kläre zuerst, ob die Auswahl des Presets jetzt persistiert werden muss, und überprüfe anschließend die Übergänge von workspace_build sowie das workspaces-Schema; erledigt wäre dies, wenn das zuletzt vom Benutzer ausgewählte Preset nach dem Stoppen/Starten und bei späteren Änderungen weiterhin verfügbar bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Bereich
- database
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100