Clean up dead Go code in handlers, pages, and stores

- Remove "chat" from surface disable guard (only admin needs it)
- Remove "chat" from IsSurfaceEnabled always-on check
- Remove unused fmt.Sprintf references in team stores
- Update stale comments referencing personas and chat surfaces

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-27 13:06:07 +00:00
parent 3aaf8dd2c0
commit 57c981d52d
5 changed files with 5 additions and 12 deletions

View File

@@ -101,13 +101,13 @@ func (h *PackageHandler) EnablePackage(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"id": id, "enabled": true})
}
// DisablePackage disables a package. Chat and Admin cannot be disabled.
// DisablePackage disables a package. Admin cannot be disabled.
// PUT /api/v1/admin/packages/:id/disable
// PUT /api/v1/admin/surfaces/:id/disable (alias)
func (h *PackageHandler) DisablePackage(c *gin.Context) {
id := c.Param("id")
if id == "chat" || id == "admin" {
if id == "admin" {
c.JSON(http.StatusBadRequest, gin.H{"error": id + " cannot be disabled"})
return
}