Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(daemon): remove dead code and improve UX feedback
yushene263064e8743
diff --git a/server/cmd/multica/cmd_workspace.go b/server/cmd/multica/cmd_workspace.goindex 9f50b9902c..85600bcf55 100644--- a/server/cmd/multica/cmd_workspace.go+++ b/server/cmd/multica/cmd_workspace.go@@ -123,6 +123,7 @@ func runWatch(cmd *cobra.Command, args []string) error {if cfg.WorkspaceID == "" {cfg.WorkspaceID = ws.ID+ fmt.Fprintf(os.Stderr, "Set default workspace to %s (%s)\n", ws.ID, ws.Name)}if err := cli.SaveCLIConfig(cfg); err != nil {diff --git a/server/internal/daemon/client.go b/server/internal/daemon/client.goindex 26540fbec5..a80b0beb01 100644--- a/server/internal/daemon/client.go+++ b/server/internal/daemon/client.go@@ -36,12 +36,6 @@ func isWorkspaceNotFoundError(err error) bool {return strings.Contains(strings.ToLower(reqErr.Body), "workspace not found")}-// Workspace represents a workspace from the API.-type Workspace struct {- ID string `json:"id"`- Name string `json:"name"`-}-// Client handles HTTP communication with the Multica server daemon API.type Client struct {baseURL string@@ -62,15 +56,6 @@ func (c *Client) SetToken(token string) {c.token = token}-// ListWorkspaces fetches the user's workspaces using the auth token.-func (c *Client) ListWorkspaces(ctx context.Context) ([]Workspace, error) {- var ws []Workspace- if err := c.getJSON(ctx, "/api/workspaces", &ws); err != nil {- return nil, err- }- return ws, nil-}-func (c *Client) ClaimTask(ctx context.Context, runtimeID string) (*Task, error) {var resp struct {Task *Task `json:"task"`diff --git a/server/internal/daemon/daemon.go b/server/internal/daemon/daemon.goindex e770a6e3c2..f0ac56de53 100644--- a/server/internal/daemon/daemon.go+++ b/server/internal/daemon/daemon.go@@ -204,6 +204,8 @@ func (d *Daemon) configWatchLoop(ctx context.Context) {}// reloadWorkspaces reconciles the active workspace set with the config file.+// NOTE: Token changes (e.g. re-login as a different user) are not picked up;+// the daemon must be restarted for a new auth token to take effect.func (d *Daemon) reloadWorkspaces(ctx context.Context) {d.reloading.Lock()defer d.reloading.Unlock()