Remove dead Go types and event code

- Delete unused Grant struct (persona-era, zero references)
- Delete CompositeModelKey (never called)
- Remove dead comment-only type stubs (NoteGraph, ProjectChannel, etc.)
- Remove empty Chat/Channel event sections from route table
- Remove dead chat.typing/channel.typing condition in WS subscriber
- Update bus doc examples and test labels to use real event names

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-27 13:04:50 +00:00
parent 23aa457a01
commit 3aaf8dd2c0
5 changed files with 19 additions and 93 deletions

View File

@@ -81,19 +81,6 @@ type TeamMember struct {
UserRole string `json:"user_role,omitempty"`
}
// =========================================
// GRANTS
// =========================================
type Grant struct {
ID string `json:"id" db:"id"`
PersonaID string `json:"persona_id" db:"persona_id"`
GrantType string `json:"grant_type" db:"grant_type"`
GrantRef string `json:"grant_ref" db:"grant_ref"`
Config JSONMap `json:"config,omitempty" db:"config"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
}
// PLATFORM POLICIES
var PolicyDefaults = map[string]string{
@@ -106,26 +93,6 @@ var PolicyDefaults = map[string]string{
"default_model": "",
}
// USER MODEL SETTINGS
// HiddenEntry identifies a model+provider pair for bulk visibility operations.
// CompositeModelKey builds the composite key used for per-provider model preferences.
func CompositeModelKey(providerConfigID, modelID string) string {
return providerConfigID + ":" + modelID
}
// CHANNELS
// SESSION PARTICIPANTS (v0.24.3)
// SessionParticipant is an ephemeral identity for anonymous workflow
// channel visitors. Scoped to a single channel, no users row required.
// MESSAGES
// CHANNEL PARTICIPANTS, MODELS, CURSORS
// PERSONA GROUPS (v0.23.0)
// HandleFromName generates a URL-safe @mention handle from a display name.
// "Veronica Sharpe" → "veronica-sharpe"
func HandleFromName(name string) string {
@@ -150,26 +117,6 @@ func HandleFromName(name string) string {
return h
}
// ORGANIZATION
// ProjectPatch holds optional fields for updating a project.
// ProjectChannel represents a channel's membership in a project.
// ProjectKB represents a KB's association with a project.
// ProjectNote represents a note's association with a project.
// NOTES
// NoteLink represents a directed link extracted from [[wikilink]] syntax.
// ExportNoteLink is a note_link with source_note_id included (for export).
// NoteLinkResult represents a backlink — a note that links to a given note.
// NoteGraphNode is a lightweight note representation for graph display.
// NoteGraphEdge is a resolved link between two notes.
// NoteGraphDangling is an unresolved [[link]] reference.
// NoteGraph is the full graph topology for a user's notes.
// ATTACHMENTS
// FILES
// FileOrigin constants
// =========================================
// AUDIT LOG
// =========================================
@@ -187,14 +134,6 @@ type AuditEntry struct {
CreatedAt time.Time `json:"created_at" db:"created_at"`
}
// USAGE TRACKING
// MODEL PRICING
// VIEW MODELS (computed, not stored)
// UserModel is the view model returned by the capability resolver.
// Combines catalog entries + Personas for the frontend.
// =========================================
// JSON HELPERS
// =========================================