Documentation
¶
Index ¶
- func CodeDiffURL(filePath, diffURI string) string
- func Listen(ctx context.Context, root, sourceDir, addr string, openBrowser bool, ...) error
- func ListenManaged(ctx context.Context, root, sourceDir, addr string, openBrowser bool, ...) error
- func OpenBrowser(rawURL string) error
- type ChangedFileTreeNode
- type ChangedFileTreeView
- type CodeReviewView
- type CoverageManifestView
- type DiffLineView
- type FileDiffView
- type FragmentOwnershipView
- type ManagedOptions
- type ManifestChunkView
- type ManifestFileView
- type ManifestOrphanView
- type ManifestOwnerView
- type ManifestTargetFileView
- type ManifestTargetView
- type ManifestTreeNode
- type NarrativeDiffView
- type RelatedSagaChapterView
- type RelatedSagaFragmentView
- type SlideReferenceView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CodeDiffURL ¶
CodeDiffURL creates a stable, escaped URL for a focused file and optional exact/range diff selection. Paths and saga-diff URIs are never shortened.
func ListenManaged ¶ added in v0.0.4
func OpenBrowser ¶ added in v0.0.4
OpenBrowser opens a trusted loopback URL using the platform launcher. It is exported for the CLI's detached-server path, where readiness is observed in a different process from the server itself.
Types ¶
type ChangedFileTreeNode ¶
type ChangedFileTreeView ¶
type ChangedFileTreeView struct {
Nodes []*ChangedFileTreeNode
FileCount int
ReviewedCount int
Added int
Deleted int
}
type CodeReviewView ¶
type CodeReviewView struct {
Files []*FileDiffView
Tree ChangedFileTreeView
SelectedFile *FileDiffView
SelectedDiff *diffAtomView
SelectedDiffs []*diffAtomView
SelectedDiffURI string
RelatedSaga []*RelatedSagaChapterView
RelatedEmpty string
NarrativeOwnership []*FragmentOwnershipView
ReviewedFiles int
}
CodeReviewView is the complete template contract for the focused code view. Files remains flat for lookup and keyboard navigation; Tree is the nested presentation model and SelectedFile is the only file intended for rendering.
type CoverageManifestView ¶
type CoverageManifestView struct {
Complete bool
Total int
Covered int
Uncovered int
Overlapping int
Orphaned int
MappingCount int
Files []*ManifestFileView
Tree []*ManifestTreeNode
Targets []*ManifestTargetView
Orphans []*ManifestOrphanView
}
CoverageManifestView is the human-auditable, bidirectional projection of coverage.Report. Files prove code-to-narrative ownership; Targets prove the reverse narrative-to-code relationship from the same atom assignments.
type DiffLineView ¶
type DiffLineView struct {
Kind string
Path string
OldLine int
NewLine int
Content string
Event string
OldPath string
NewPath string
Atom *diffAtomView
// Linked marks a row inside a whole-file diff as evidence for the narrative
// target that requested it, so a drawer can distinguish the lines its
// explanation covers from the surrounding file it shows for context.
Linked bool
}
DiffLineView is presentation-only. Atom is populated for changed lines and events so existing fully-qualified comment and suggestion contracts remain attached to the same diff atom.
type FileDiffView ¶
type FragmentOwnershipView ¶
type FragmentOwnershipView struct {
ChapterID string
ChapterTitle string
FragmentID string
Title string
Target string
Anchor string
Href string
Diffs []*NarrativeDiffView
}
FragmentOwnershipView is the forward fragment-to-diff half of the ownership contract. Unavailable links retain their original fully-qualified URI.
type ManagedOptions ¶ added in v0.0.4
ManagedOptions lets the CLI supervise a detached loopback server without weakening the ordinary foreground server. The shutdown token is random, stored only in the user's private runtime directory, and never rendered into saga content.
type ManifestChunkView ¶
type ManifestFileView ¶
type ManifestFileView struct {
Path string
AtomCount int
Added int
Deleted int
Events int
Covered int
Uncovered int
Chunks []*ManifestChunkView
// HasDiff records that a body exists for this path without carrying it.
// The coverage audit fetches each body from /api/file-diff when a reviewer
// opens that file, so the page describes the whole comparison without
// containing it.
HasDiff bool
}
type ManifestOrphanView ¶
type ManifestOrphanView struct {
Owner *ManifestOwnerView
URI string
Reason string
}
type ManifestOwnerView ¶
type ManifestTargetFileView ¶
type ManifestTargetView ¶
type ManifestTargetView struct {
ManifestOwnerView
AtomCount int
Chunks []*ManifestChunkView
Files []*ManifestTargetFileView
}
type ManifestTreeNode ¶
type ManifestTreeNode struct {
Name string
Path string
Kind string
Depth int
Children []*ManifestTreeNode
File *ManifestFileView
AtomCount int
Added int
Deleted int
Uncovered int
}
ManifestTreeNode presents coverage as the repository the reviewer already knows. The tree ships fully expanded so every changed file and its coverage state is visible without hunting, while folders remain collapsible.
type NarrativeDiffView ¶
type RelatedSagaChapterView ¶
type RelatedSagaFragmentView ¶
type SlideReferenceView ¶ added in v0.1.0
type SlideReferenceView struct {
ID string
Title string
Target string
Anchor string
Href string
URL string
MediaType string
ReviewState string
ItemCount int
}
SlideReferenceView is the common visual language for a slide referenced outside the presentation surface. Evidence remains owned by Items, while navigation rolls those references up to the slide a reviewer can recognize.