diff --git a/README.md b/README.md
index b92b1bf5..d2d81989 100644
--- a/README.md
+++ b/README.md
@@ -360,7 +360,7 @@ codexometer --codex /path/to/codex
| `w` | Cycle Cost, Balanced, and Speed benchmark ranking weights |
| `Up` / `Down` | Select a Benchmark row, or scroll its open detail |
| `Enter` / `Space` | Open a selected result, or toggle a Benchmark Scope checkbox |
-| `c` | Copy the complete open Benchmark detail to the terminal clipboard |
+| `c` | Copy the Benchmark result matrix as Markdown, or copy the complete open run detail |
| `Page Up` / `Page Down` | Scroll Monitor session rows or Benchmark result pages |
| `q` | Quit |
| `Esc` | Return from Benchmark detail or Scope; otherwise quit |
@@ -967,11 +967,16 @@ arrive, then changes in place to the final `PASS`, `FAIL`, or `STOPPED` result.
requested and actual model, effort, task, outcome, live duration, token classes,
API-equivalent cost, exact benchmark prompt, visible structured response
(including the submitted Starlark), policy events, and deterministic-verifier
-result. `Esc` returns to the same selected matrix row. Page keys, arrow keys,
-and the mouse wheel scroll a long detail. Press `c` or click **Copy** in the
-detail title to copy the complete unstyled detail, including interactions below
-the visible scroll window. Copy uses the terminal's OSC 52 clipboard support,
-which is not available in every terminal.
+result. In the matrix, press `c` or click **Copy** at the lower right to export
+a clean Markdown table containing only the eight column headings and every data
+row. The export includes filtered and off-screen rows, retains the current sort
+and rank weighting, and excludes the Show and Rank controls.
+
+`Esc` returns to the same selected matrix row. Page keys, arrow keys, and the
+mouse wheel scroll a long detail. With a detail open, press `c` or click
+**Copy** at the lower right to copy the complete unstyled detail, including
+interactions below the visible scroll window. Both copy actions use the
+terminal's OSC 52 clipboard support, which is not available in every terminal.
This transcript is deliberately benchmark-only. It is populated directly by
the ephemeral thread that Codexometer created for that trial, bounded to 4,096
@@ -979,9 +984,9 @@ entries of at most 64 KiB each and 1 MiB total, retained only in process
memory, and discarded when a new suite starts or Codexometer exits. It does not
subscribe to or read ordinary Codex conversations, and it excludes reasoning
events, credentials, request headers, and internal app-server IDs.
-Codexometer sends that bounded transcript to the system clipboard only when you
-explicitly press `c` or click **Copy**; the clipboard then falls under your
-operating system and terminal's normal retention behavior.
+Codexometer sends result data or that bounded transcript to the system clipboard
+only when you explicitly press `c` or click **Copy**; the clipboard then falls
+under your operating system and terminal's normal retention behavior.
#### Challenges and difficulty
diff --git a/internal/ui/benchmark.go b/internal/ui/benchmark.go
index 6cc728f4..010f453a 100644
--- a/internal/ui/benchmark.go
+++ b/internal/ui/benchmark.go
@@ -1140,7 +1140,24 @@ func (m Model) renderBenchmarkTable(width, height int, colors palette) string {
lines = lines[:bodyHeight]
}
title := "RESULT MATRIX // STANDARD API-EQUIVALENT USD"
- return frameSized(width, max(height-2, 1), ansi.Truncate(title, max(innerWidth-4, 1), ""), strings.Join(lines, "\n"), colors.primary, colors)
+ copyControl := m.renderBenchmarkTableCopyControl(colors)
+ return frameSizedWithActions(
+ width,
+ max(height-2, 1),
+ ansi.Truncate(title, max(innerWidth-4, 1), ""),
+ "",
+ copyControl,
+ strings.Join(lines, "\n"),
+ colors.primary,
+ colors,
+ )
+}
+
+func (m Model) renderBenchmarkTableCopyControl(colors palette) string {
+ if !m.benchmarkResultsCopyAvailable() {
+ return lipgloss.NewStyle().Foreground(colors.dim).Background(colors.background).Render(benchmarkDetailCopyLabel)
+ }
+ return m.renderBenchmarkDetailControl(benchmarkDetailCopyLabel, footerButtonBenchmarkCopy, colors)
}
type benchmarkTableRow struct {
@@ -1161,6 +1178,59 @@ func (m Model) orderedBenchmarkResults() []codex.BenchmarkResult {
return ordered
}
+func (m Model) orderedBenchmarkClipboardResults() []codex.BenchmarkResult {
+ rankings := benchmarkRankings(m.benchmarkResults, m.benchmarkRankMode)
+ ordered := sortedBenchmarkResults(m.benchmarkResults, m.benchmarkSort, m.benchmarkSortDescending, rankings)
+ if active := m.currentBenchmarkActive(); active != nil {
+ ordered = append(ordered, *active)
+ }
+ return ordered
+}
+
+func (m Model) benchmarkResultsCopyAvailable() bool {
+ return len(m.benchmarkResults) > 0 || m.benchmarkActive != nil
+}
+
+func (m Model) benchmarkResultsClipboardText() string {
+ results := m.orderedBenchmarkClipboardResults()
+ if len(results) == 0 {
+ return ""
+ }
+
+ headings := []string{"RANK", "MODEL", "EFFORT", "TASK", "RESULT", "TIME", "TOKENS", "API EQ"}
+ var output strings.Builder
+ writeMarkdownBenchmarkRow(&output, headings)
+ writeMarkdownBenchmarkRow(&output, []string{"---", "---", "---", "---", "---", "---", "---", "---"})
+
+ rankings := benchmarkRankings(m.benchmarkResults, m.benchmarkRankMode)
+ activeKey := m.activeBenchmarkKey()
+ for _, result := range results {
+ active := activeKey != "" && benchmarkRunKey(result) == activeKey
+ writeMarkdownBenchmarkRow(&output, benchmarkResultValues(result, rankings, active))
+ }
+ return output.String()
+}
+
+func writeMarkdownBenchmarkRow(output *strings.Builder, values []string) {
+ output.WriteString("|")
+ for _, value := range values {
+ output.WriteString(" ")
+ output.WriteString(markdownBenchmarkCell(value))
+ output.WriteString(" |")
+ }
+ output.WriteString("\n")
+}
+
+func markdownBenchmarkCell(value string) string {
+ value = ansi.Strip(value)
+ value = strings.ReplaceAll(value, "\r\n", "\n")
+ value = strings.ReplaceAll(value, "\r", "\n")
+ value = strings.ReplaceAll(value, "\\", "\\\\")
+ value = strings.ReplaceAll(value, "|", "\\|")
+ value = strings.ReplaceAll(value, "\n", "
")
+ return strings.TrimSpace(value)
+}
+
func (m Model) benchmarkTableResults() []codex.BenchmarkResult {
results := slices.Clone(m.benchmarkResults)
if active := m.currentBenchmarkActive(); active != nil {
@@ -1803,6 +1873,13 @@ func (m Model) benchmarkButtonAt(x, y int) footerButtonID {
if layout.tableHeight >= 3 && localX < layout.width && localY == layout.topHeight+1 {
return benchmarkSegmentButtonAt(localX, m.benchmarkFilterLine(max(layout.width-4, 1)))
}
+ if layout.tableHeight >= 3 && m.benchmarkResultsCopyAvailable() && localY == layout.topHeight+layout.tableHeight-1 {
+ copyWidth := lipgloss.Width(benchmarkDetailCopyLabel)
+ copyStart := layout.width - copyWidth - 2
+ if layout.width >= copyWidth+4 && localX >= copyStart && localX < copyStart+copyWidth {
+ return footerButtonBenchmarkCopy
+ }
+ }
return footerButtonNone
}
diff --git a/internal/ui/benchmark_test.go b/internal/ui/benchmark_test.go
index 5c161e32..bda77103 100644
--- a/internal/ui/benchmark_test.go
+++ b/internal/ui/benchmark_test.go
@@ -140,6 +140,94 @@ func TestBenchmarkViewRendersResponsiveResultsTable(t *testing.T) {
}
}
+func TestBenchmarkResultsCopyControlExportsMarkdownTable(t *testing.T) {
+ results := []codex.BenchmarkResult{
+ {
+ TaskName: "PIPE | TASK", Model: "alpha", DisplayName: "Alpha", Effort: "high", Correct: true,
+ Duration: time.Second, Usage: codex.BenchmarkUsage{TotalTokens: 1234}, UsageKnown: true, CostKnown: true, CostUSD: 0.0123,
+ },
+ {
+ TaskName: "FAILED TASK", Model: "zulu", DisplayName: "Zulu", Effort: "low",
+ Duration: 2 * time.Second, Usage: codex.BenchmarkUsage{TotalTokens: 99}, UsageKnown: true, Failure: "wrong result",
+ },
+ }
+ active := codex.BenchmarkResult{
+ Provider: "digbench", TaskName: "DIGBENCH P-1", Model: "live", DisplayName: "Live", Effort: "medium",
+ CurrentLevel: 4, Duration: 3 * time.Second,
+ }
+ model := Model{
+ snapshot: codex.DemoSnapshot(), width: 100, height: 30, meterView: viewBenchmark,
+ benchmarkState: benchmarkRunning, benchmarkResults: results, benchmarkActive: &active,
+ benchmarkFilter: benchmarkFilterPass, benchmarkSort: benchmarkSortModel,
+ }
+
+ clipboard := model.benchmarkResultsClipboardText()
+ lines := strings.Split(strings.TrimSuffix(clipboard, "\n"), "\n")
+ if len(lines) != 5 {
+ t.Fatalf("Markdown export lines = %d, want headings, separator, and 3 data rows:\n%s", len(lines), clipboard)
+ }
+ if lines[0] != "| RANK | MODEL | EFFORT | TASK | RESULT | TIME | TOKENS | API EQ |" {
+ t.Fatalf("Markdown headings = %q", lines[0])
+ }
+ if lines[1] != "| --- | --- | --- | --- | --- | --- | --- | --- |" {
+ t.Fatalf("Markdown separator = %q", lines[1])
+ }
+ for _, want := range []string{"PIPE \\| TASK", "FAILED TASK", "IN PROGRESS (P-1, 4)", "~$0.0123"} {
+ if !strings.Contains(clipboard, want) {
+ t.Fatalf("Markdown export missing %q:\n%s", want, clipboard)
+ }
+ }
+ for _, unwanted := range []string{"SHOW //", "[ COST ]", "[ BAL ]", "[ SPEED ]"} {
+ if strings.Contains(clipboard, unwanted) {
+ t.Fatalf("Markdown export contains control text %q:\n%s", unwanted, clipboard)
+ }
+ }
+ if strings.Index(clipboard, "Alpha") > strings.Index(clipboard, "Zulu") {
+ t.Fatalf("Markdown export did not retain the active model sort:\n%s", clipboard)
+ }
+ if !strings.Contains(clipboard, "Zulu") {
+ t.Fatalf("Markdown export obeyed the PASS display filter instead of including all data:\n%s", clipboard)
+ }
+ if got := markdownBenchmarkCell("first\nsecond"); got != "first
second" {
+ t.Fatalf("multiline Markdown cell = %q", got)
+ }
+
+ copyX, copyY := renderedTextStart(t, model, benchmarkDetailCopyLabel)
+ dashboard := model.dashboardLayout()
+ geometry := layoutBenchmarkArea(dashboard.contentWidth, dashboard.meterHeight)
+ if wantY := dashboard.meterY + geometry.topHeight + geometry.tableHeight - 1; copyY != wantY {
+ t.Fatalf("matrix Copy control y = %d, want bottom frame y = %d (meter y=%d height=%d, top=%d table=%d)", copyY, wantY, dashboard.meterY, dashboard.meterHeight, geometry.topHeight, geometry.tableHeight)
+ }
+ updated, command := model.Update(tea.MouseMotionMsg{X: copyX, Y: copyY})
+ model = updated.(Model)
+ if command != nil || model.hoveredButton != footerButtonBenchmarkCopy {
+ t.Fatal("result matrix Copy hover was not recorded")
+ }
+ updated, command = model.Update(tea.MouseClickMsg{X: copyX, Y: copyY, Button: tea.MouseLeft})
+ model = updated.(Model)
+ if command == nil || model.flashedButton != footerButtonBenchmarkCopy {
+ t.Fatal("result matrix Copy click did not issue a clipboard command")
+ }
+ updated, command = model.Update(tea.KeyPressMsg{Code: 'c', Text: "c"})
+ model = updated.(Model)
+ if command == nil || model.flashedButton != footerButtonBenchmarkCopy {
+ t.Fatal("c did not activate result matrix Copy")
+ }
+}
+
+func TestBenchmarkResultsCopyControlIsDisabledWithoutRows(t *testing.T) {
+ model := Model{snapshot: codex.DemoSnapshot(), width: 100, height: 30, meterView: viewBenchmark}
+ copyX, copyY := renderedTextStart(t, model, benchmarkDetailCopyLabel)
+ if got := model.benchmarkButtonAt(copyX, copyY); got != footerButtonNone {
+ t.Fatalf("empty result matrix Copy hit target = %d, want none", got)
+ }
+ updated, command := model.Update(tea.KeyPressMsg{Code: 'c', Text: "c"})
+ model = updated.(Model)
+ if command != nil || model.flashedButton == footerButtonBenchmarkCopy {
+ t.Fatal("empty result matrix accepted the Copy shortcut")
+ }
+}
+
func TestBenchmarkRowClickOpensScrollableBenchmarkOnlyDetail(t *testing.T) {
result := codex.BenchmarkResult{
TaskID: "merge-ranges", TaskName: "MERGE RANGES", Model: "detail-model", DisplayName: "Detail Model", Effort: "high",
diff --git a/internal/ui/model.go b/internal/ui/model.go
index 7b9b01e4..f59994e7 100644
--- a/internal/ui/model.go
+++ b/internal/ui/model.go
@@ -436,7 +436,7 @@ func (m Model) Update(message tea.Msg) (tea.Model, tea.Cmd) {
return m.pressFooterButton(footerButtonBenchmarkSelected)
}
case "c":
- if m.meterView == viewBenchmark && m.benchmarkDetail != nil {
+ if m.meterView == viewBenchmark && !m.benchmarkScopeOpen && (m.benchmarkDetail != nil || m.benchmarkResultsCopyAvailable()) {
return m.pressFooterButton(footerButtonBenchmarkCopy)
}
case "a":
@@ -985,8 +985,13 @@ func (m Model) activateFooterButton(button footerButtonID) (Model, tea.Cmd) {
case footerButtonBenchmarkRankSpeed:
m.setBenchmarkRankMode(benchmarkRankSpeed)
case footerButtonBenchmarkCopy:
- if m.meterView == viewBenchmark && m.benchmarkDetail != nil {
- return m, tea.SetClipboard(m.benchmarkDetailClipboardText())
+ if m.meterView == viewBenchmark {
+ if m.benchmarkDetail != nil {
+ return m, tea.SetClipboard(m.benchmarkDetailClipboardText())
+ }
+ if !m.benchmarkScopeOpen && m.benchmarkResultsCopyAvailable() {
+ return m, tea.SetClipboard(m.benchmarkResultsClipboardText())
+ }
}
case footerButtonBenchmarkClose:
if m.meterView == viewBenchmark {
diff --git a/intro-post.md b/intro-post.md
index b1fd3115..92e8db20 100644
--- a/intro-post.md
+++ b/intro-post.md
@@ -46,7 +46,7 @@ Each trial appears in the result matrix as soon as it starts and remains clickab
- move and state transitions for interactive games; and
- a complete copy-to-clipboard action for sharing or further analysis.
-You can enter and leave a live detail view without interrupting the run, navigate long transcripts with the keyboard, and stop an active suite while retaining completed work and the captured incomplete result.
+The result matrix itself can also be copied as a clean Markdown table containing its headings and every result row, without the interactive controls. You can enter and leave a live detail view without interrupting the run, navigate long transcripts with the keyboard, and stop an active suite while retaining completed work and the captured incomplete result.
Deterministic suites can be ranked with cost-, speed-, or balanced weighting. DigBench uses the same controls for a separate observed-run ranking, with the clear caveat that its server-assigned random seeds make individual attempts exploratory rather than controlled model comparisons.