coder / coder/internal

Chosen preset ID is not retained beyond initial workspace build

Aperta
#398 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
project/prebuilds
Lingua principale
Nessun dato sulla lingua
Stelle
3
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

No files, tests, or entry points are named. First confirm whether preset selection now needs to be persisted, then review workspace_build transitions and the workspaces schema; done would mean the latest user-selected preset remains available after stop/start and later changes.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
database
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.