Sync: open editors follow values stored elsewhere

Abierto
#140 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp
Área
desktop

Línea de trabajo

Read PenCatalogueSync, IDataProvider.QueryPensAsync, IPenCatalogueEditor.ReadAsync, AppSectionWatcher, and SettingsViewModel.FollowAppliedTheme, then review docs/architecture/overview.md for the current snapshot behavior. The issue requires coordinated changes to database reads, editor and settings reconciliation, and documentation; it is done when the listed acceptance cases pass and the overview describes the new behavior.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

Problem

A running viewer follows what other instances store, but only partly, and an open editor follows
none of it.

Stored Main window Open editor
Shown pen fields in semiplot_tags PenCatalogueSync, every 5 s, changed in place snapshot; re-read only on Refresh pen list
A pen's *_on_start read, changes nothing on screen by design snapshot
Group membership and group names read as strings in Pen.Groups snapshot
A semiplot_groups row's own columns not read: QueryPensAsync returns Pen only snapshot
app/theme AppSectionWatcher, applied live SettingsViewModel.FollowAppliedTheme
app/locale, all of connection/ read at start only snapshot; a save re-reads and writes only changed keys

The catalogue has two independent reads: the chart reads IDataProvider.QueryPensAsync, normalised;
the editor reads IPenCatalogueEditor.ReadAsync, as stored (PenCatalogue, StoredGroup). A group's
own column, such as folded_on_start (#139), never reaches the sidebar. An edit stored elsewhere
while the pen editor is open stays invisible there, and the next write of the same column overwrites
it without a word (docs/architecture/overview.md#the-pen-and-group-editor).

Rule

FollowAppliedTheme already does it for the theme: a field the operator has not touched follows the
stored value; a field the operator changed keeps its draft. Apply that to every stored value.

Proposal

  1. One read per source.
    • Database: PenCatalogueSync reads the full PenCatalogue once per ReadInterval. The chart
      takes the normalised Pen projection, the sidebar takes the groups, the editor takes the whole
      catalogue. The provider's normalisation becomes a pure mapping over the stored read; the start
      sequence reads the same statement.
    • Files: AppSectionWatcher watches connection/ as well as app/.
  2. The delta compares the whole catalogue: a changed group column is a change even when every pen
    is equal.
  3. The pen editor reconciles each read per field and never rebuilds a form.
    • A field with no draft and no queued write takes the stored value.
    • A field with a draft keeps it, as it does for the editor's own writes today.
    • Rows and groups join and leave by id; the selection stays.
  4. The settings dialog follows the same rule for every field, not only the theme.
  5. The main window keeps its current behaviour: shown fields change in place, *_on_start and
    folded_on_start apply only to what enters the window.

The database part and the settings part ship separately.

Acceptance

  • A pen field changed by another instance shows in an open pen editor within one read, unless that
    field holds a draft.
  • A draft survives a read that changes the same field elsewhere; its write then wins, as today.
  • A selected pen or group stays selected across a read that adds or removes another one.
  • A group column changed elsewhere reaches every running viewer within one read.
  • A connection/ key changed on disk shows in an open settings dialog unless the field holds a
    draft; the restart notice still governs when it takes effect.
  • docs/architecture/overview.md (the pen editor's snapshot rule, The live catalogue, The settings
    window) states the new behaviour.
Lenguaje dominante
C#
Estrellas
0
Forks
0
Merge medio
5 min
PR fusionados (30 d)
31

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Semiteq/SemiPlot

Todos los issues de Semiteq/SemiPlot

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.