[BUG] Saving Configure Board hides all workspace tools (Iterations, Milestones, Pages...) and enables Queue

Ouverte
#473 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
Une demi-journée
Accessibilité débutants
68/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
javascript
Domaine
frontend

Piste de recherche

Start in frontend/src/lib/settings/BoardConfigurationPage.svelte: the fallback at ~line 207 builds enabledViews from workspaceViewItems, and the save branch at ~line 774 writes it whenever view_settings exists. Read navigation/workspaceNavigation.js for workspaceViewItems, workspaceOnlyViews and DefaultWorkspaceNavItemIDs, then WorkspaceNavigation.svelte to see how enabledNavIds filters the Tools section. Done means saving columns/backlog alone writes no enabled_views and tools stay visible; note the linked issue #456 blocks the UI recovery path.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

fixed-0.9.5
Summary

Saving the workspace-scope Configure Board page (/workspaces/:id/board/configure) writes an explicit view_settings.enabled_views override that contains only the collection views plus queue. All workspace tools (agents, iterations, milestones, analytics, actions, pages) disappear from the Tools section of the workspace sidebar, and Queue — opt-in by default — shows up.

Because of #456 the Configure navigation page can't be used to turn the tools back on, so the only way out in the UI is gone.

Environment
  • Windshift v0.9.3 (Docker image ghcr.io/windshiftapp/windshift:v0.9.3, SQLite)
  • The relevant code is identical on main (checked at 5f1578b)
Steps to reproduce
  1. Create a new workspace (no explicit navigation override yet). The Tools section shows Agents, Iterations, Milestones, Analytics, Actions, Pages.
  2. Open Board → Configure, change the columns and/or the backlog statuses (I left Completed work: Show all as is).
  3. Click Save Changes.

Actual: The Tools section only shows Look and Feel and Settings; Queue appears under the views. The board configuration now contains:

"view_settings": {
  "completed_visibility": "all",
  "enabled_views": ["backlog", "board", "list", "tree", "map", "roadmap", "queue"]
}

Expected: Saving columns/backlog leaves the navigation as it was (tools visible, Queue off), i.e. no enabled_views override is written unless the user changed the Views tab.

I observed this once on a fresh workspace; the cause below is from reading the code, and the stored list matches it exactly.

Cause

frontend/src/lib/settings/BoardConfigurationPage.svelte:

  1. When the scope has no override, the Views state falls back to the collection views only (line ~207):

    enabledViews = Array.isArray(effectiveViews) && effectiveViews.length > 0
      ? [...effectiveViews]
      : workspaceViewItems.map((view) => view.id);   // backlog … roadmap + queue, no tools
    

    workspaceViewItems (in navigation/workspaceNavigation.js) contains the six board views and queue; the tools live in workspaceOnlyViews.

  2. On save, that list is written as an explicit override as soon as view_settings exists at all — which it does once completed_visibility has been stored (line ~774):

    } else if (viewsDirty || boardConfig?.view_settings) {
      viewSettings.enabled_views = [...enabledViews];
    }
    

WorkspaceNavigation.svelte then filters the Tools section by enabledNavIds(workspaceId), so every tool that isn't in the list is hidden. queue is in workspaceViewItems, so it becomes enabled although it isn't part of DefaultWorkspaceNavItemIDs.

Suggested fix
  • Don't write enabled_views unless the Views tab was actually changed (viewsDirty) — an existing view_settings object (e.g. only completed_visibility) is not a reason to materialise the default.
  • At workspace scope, keep the ids this page doesn't manage when saving, e.g. merge back every id from the effective set that isn't one of the page's view ids (tools), instead of replacing the whole list.
  • For the inherited case, fall back to the real workspace default (DefaultWorkspaceNavItemIDs) rather than workspaceViewItems.
Workaround

PUT /rest/api/v2/workspaces/:id/board-configuration (token with collections:read + collections:write) with the current configuration and the tool ids appended to view_settings.enabled_views. Columns must be sent in request shape (id, name, display_order, wip_limit, color, status_ids), see #456. PATCH returns 405 on /rest/api/v2.

Langage dominant
Go
Étoiles
421
Forks
50
Merge moyen
17 h 34 min
PR mergées (30 j)
80

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de Windshiftapp/core

Toutes les issues de Windshiftapp/core

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.