Skip to content

Converge 'hub-native' / 'Hub Workspace' naming to 'Hub-managed' #96

@scion-gteam

Description

@scion-gteam

Problem

The concept of a project whose workspace is created and managed by Scion in the hub-controlled part of the broker filesystem is named inconsistently:

  • hub-native in Go code (ProjectTypeHubNative = "hub-native", function names like hubNativeProjectPath, initHubNativeProject, findAgentInHubNativeProjects, and many comments)
  • "Hub Workspace" in the web UI (new-project dialog label, git-remote-display fallback text)
  • "hub-native" in documentation and design docs

The canonical name should be Hub-managed (project/workspace).

Plan

Identifiers & constants (Go)

  • Rename ProjectTypeHubNativeProjectTypeHubManaged (value changes from "hub-native" to "hub-managed")
  • Rename functions: hubNativeProjectPathhubManagedProjectPath, initHubNativeProjectinitHubManagedProject, findAgentInHubNativeProjectsfindAgentInHubManagedProjects
  • Rename test helpers: createTestHubNativeProjectcreateTestHubManagedProject, test function names with HubNativeHubManaged
  • Update all Go comments from "hub-native" to "hub-managed"

Web UI (TypeScript)

  • Change ProjectType from 'linked' | 'hub-native' to 'linked' | 'hub-managed'
  • Change display label from "Hub Workspace" to "Hub-managed Workspace"
  • Change fallback text in git-remote-display.ts

Documentation

  • Update all occurrences in docs-site/, .design/, agents.md, and claude.md

Wire-value / backward-compatibility notes

The projectType field ("hub-native""hub-managed") is a computed field — it is not stored in the database. It is derived at read time by populateProjectType() based on whether any project provider has a local path outside ~/.scion/projects/. Therefore:

  • No data migration is needed
  • No stored values reference "hub-native" as a string
  • The API response projectType field will change from "hub-native" to "hub-managed" immediately
  • Since the project is in pre-release/alpha ("refactoring that modifies or removes behavior does not require graceful deprecation" per CLAUDE.md), this is acceptable
  • The form value="hub" in the project-create dialog is unaffected (it's a mode selector, not the ProjectType wire value)

Affected files

Go

  • pkg/store/models.go — constant + comments
  • pkg/store/sqlite/sqlite.go — comment + reference
  • pkg/hub/handlers.go — function renames + comments (~20 occurrences)
  • pkg/hub/server.go — comments
  • pkg/hub/brokerclient.go — comment
  • pkg/hub/project_webdav.go — comments
  • pkg/hub/httpdispatcher.go — comments
  • pkg/hub/project_workspace_handlers.go — comments
  • pkg/runtimebroker/handlers.go — function rename + comments
  • pkg/runtimebroker/start_context.go — comments
  • pkg/runtimebroker/types.go — comment
  • pkg/config/project_marker.go — comment
  • pkg/storage/storage.go — comment
  • pkg/store/store.go — comment
  • Test files: handlers_test.go, start_context_test.go, project_workspace_handlers_test.go, handlers_project_test.go, workspace_handlers_test.go

Web

  • web/src/shared/types.ts
  • web/src/components/pages/project-create.ts
  • web/src/components/shared/git-remote-display.ts

Docs

  • docs-site/ (multiple files)
  • .design/ (multiple files)
  • agents.md, claude.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions