summaryrefslogtreecommitdiff
path: root/web/templates/page-session.tmpl
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-02 23:43:08 -0300
committerGabriel Schneider <[email protected]>2026-08-03 09:54:39 -0300
commit5ec72f8723d795d0b02d7e9ebb9f555f0c7e6a2e (patch)
treef12f4b700fff4ff6f7e818d2a542672ba0b8d76e /web/templates/page-session.tmpl
parenta9263daee9413c5eff3c1f1bebcd224442fd8685 (diff)
downloadnotevi-5ec72f8723d795d0b02d7e9ebb9f555f0c7e6a2e.tar.gz
notevi-5ec72f8723d795d0b02d7e9ebb9f555f0c7e6a2e.zip
rebrand to notevi: one CLI over the jj sidecar
vr and vrsite become a single binary. vrsite/ folds into a web package in one module (0x4200.cafe/notevi); "notevi web" serves and exports exactly what vrsite did, and "notevi read/grep/note/query" is unchanged. The sidecar is renamed with it: notevi_log, notevi-log.jsonl, and the description "private: notevi log". The pre-rebrand names are still recognized, so an old repository opens and reads; it is renamed in place on the first write, or up front with "notevi migrate DIR...". That rename cannot be a single mv inside jj run. jj only auto-tracks a *new* file in the run working copy below a size limit it does not take from the command line, so writing a whole log under a name the change has never held is silently dropped while jj reports success. ensureLogFile creates the file empty first and lets every later byte be a modification of a tracked file, which snapshots at any size; that also fixes the same latent bug when importing a large legacy vr-log.jsonl. Adds a bem-te-vi mark (favicon and nav brand) and a README. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Diffstat (limited to 'web/templates/page-session.tmpl')
-rw-r--r--web/templates/page-session.tmpl70
1 files changed, 70 insertions, 0 deletions
diff --git a/web/templates/page-session.tmpl b/web/templates/page-session.tmpl
new file mode 100644
index 0000000..1155b67
--- /dev/null
+++ b/web/templates/page-session.tmpl
@@ -0,0 +1,70 @@
+{{/* One session's conversation, with its notevi log woven in by time. */}}
+{{define "page-session"}}
+{{$c := .Conv}}
+<header class="filehead">
+ <h1>
+ {{if $c.Agent}}<span class="chip am{{$c.Bit}}">{{$c.Agent}}</span> {{end}}
+ <code title="{{$c.Session}}">{{short $c.Session}}</code>
+ </h1>
+ <p class="meta">
+ {{if $c.Model}}{{$c.Model}} · {{end}}{{$c.Reads}} reads · {{$c.Greps}} greps · {{$c.Notes}} notes
+ {{if $c.Dir}} · <span title="{{$c.Dir}}">{{base $c.Dir}}</span>{{end}}
+ {{if $c.Harness}} · {{$c.Harness}}{{end}}
+ </p>
+ {{if $c.Path}}
+ <p class="meta"><code>{{$c.Path}}</code></p>
+ {{else}}
+ <p class="meta hint">no transcript found for this session — searched
+ {{if $c.Roots}}{{range $i, $r := $c.Roots}}{{if $i}}, {{end}}<code>{{$r}}</code>{{end}}{{else}}nowhere: <code>-transcripts</code> is empty{{end}} ·
+ showing the notevi log alone</p>
+ {{end}}
+ {{if $c.Err}}<p class="err">{{$c.Err}}</p>{{end}}
+</header>
+
+<section class="convpage">
+ {{if $c.Windowed}}
+ <p class="meta">
+ moments {{$c.From}}–{{$c.To}} of {{$c.Total}}{{if $c.Anchor}}, around the note{{end}} ·
+ {{if $c.Incomplete}}the rest is beyond what one page renders{{else}}<a href="{{$c.AllHref}}">show the whole conversation</a>{{end}}
+ </p>
+ {{end}}
+
+ <div class="conv" data-anchor="{{$c.Anchor}}">
+ {{range $c.Turns}}
+ {{if .Note}}
+ <div class="turn t-note{{if .Here}} here{{end}}">
+ <span class="role">note</span><time>{{.Clock}}</time>
+ {{if .Note.File}}
+ <div class="notewrap" data-href="{{$.NoteHref .Note}}" tabindex="0" role="link"
+ title="open this note on the code it is about">{{template "note" (dict "N" .Note "P" $)}}</div>
+ {{else}}
+ <div class="notewrap">{{template "note" (dict "N" .Note "P" $)}}</div>
+ {{end}}
+ </div>
+ {{else if eq .Role "notevi"}}
+ <div class="turn t-notevi">
+ <span class="role">notevi</span><time>{{.Clock}}</time>
+ {{if .File}}<a class="what" href="{{$.Href "code" .File}}">{{.Text}}</a>
+ {{else}}<span class="what">{{.Text}}</span>{{end}}
+ </div>
+ {{else if eq .Role "tool"}}
+ <div class="turn t-tool">
+ <span class="role">{{.Tool}}</span><time>{{.Clock}}</time>
+ <code class="what">{{.Detail}}</code>
+ </div>
+ {{else if eq .Role "result"}}
+ <div class="turn t-result{{if eq .Kind "error"}} bad{{end}}">
+ <span class="role">→{{if .Tool}} {{.Tool}}{{end}}</span><time></time>
+ <code class="what">{{.Detail}}</code>
+ </div>
+ {{else}}
+ <div class="turn t-say t-{{.Role}}">
+ <span class="role">{{.Role}}</span><time>{{.Clock}}</time>
+ <p>{{.Text}}</p>
+ </div>
+ {{end}}
+ {{end}}
+ {{if not $c.Turns}}<p class="meta hint">nothing recorded for this session</p>{{end}}
+ </div>
+</section>
+{{end}}