Skip to content

fix(view): keep archived changes off the dashboard - #2031

Merged
TabishB merged 4 commits into
mainfrom
claude/archive-history-guardrails-d27d75
Oct 2, 2026
Merged

TabishB merged 4 commits into
mainfrom
claude/archive-history-guardrails-d27d75

Conversation

@TabishB

@TabishB TabishB commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2030

What this changes

openspec view is a one-screen dashboard for a person reading a terminal. #399 added every archived change to it. In projects with hundreds of archived changes, that list pushed the active work off the screen, which is the whole point of the command.

How you verified it

Demo project: 1 draft, 2 active, 1 completed change, 4 specs, 189 archived changes.

Lines of output
Before 230 (active work scrolls off; the last screen is all archive)
After 37
Before: first 40 of 230 lines

OpenSpec Dashboard

════════════════════════════════════════════════════════════
Summary:
  ● Specifications: 4 specs, 8 requirements
  ● Draft Changes: 1
  ● Active Changes: 2 in progress
  ● Completed Changes: 1
  ● Archived Changes: 189
  ● Task Progress: 3/9 (33% complete)

Draft Changes
────────────────────────────────────────────────────────────
  ○ explore-offline-mode

Active Changes
────────────────────────────────────────────────────────────
  ◉ refresh-token-rotation         [████░░░░░░░░░░░░░░░░] 20%
    └─ [spec-driven] proposal→ specs design tasks✓
  ◉ add-rate-limiting              [██████████░░░░░░░░░░] 50%
    └─ [spec-driven] proposal→ specs design tasks✓

Completed Changes
────────────────────────────────────────────────────────────
  ✓ fix-search-pagination

Archived Changes
────────────────────────────────────────────────────────────
  ◦ 2026-01-03-fix-billing-webhook-1
  ◦ 2026-01-03-remove-email-digest-3
  ◦ 2026-01-03-update-search-index-2
  ◦ 2026-01-07-add-rate-limits-6
  ◦ 2026-01-07-improve-audit-log-4
  ◦ 2026-01-07-refactor-export-csv-5
  ◦ 2026-01-11-fix-session-store-7
  ◦ 2026-01-11-remove-billing-webhook-9
  ◦ 2026-01-11-update-login-flow-8
  ◦ 2026-01-15-add-audit-log-12
  ◦ 2026-01-15-improve-search-index-10
  ... 150 more archived changes, then Specifications ...
After: full output

OpenSpec Dashboard

════════════════════════════════════════════════════════════
Summary:
  ● Specifications: 4 specs, 8 requirements
  ● Draft Changes: 1
  ● Active Changes: 2 in progress
  ● Completed Changes: 1
  ● Task Progress: 3/9 (33% complete)

Draft Changes
────────────────────────────────────────────────────────────
  ○ explore-offline-mode

Active Changes
────────────────────────────────────────────────────────────
  ◉ refresh-token-rotation         [████░░░░░░░░░░░░░░░░] 20%
    └─ [spec-driven] proposal→ specs design tasks✓
  ◉ add-rate-limiting              [██████████░░░░░░░░░░] 50%
    └─ [spec-driven] proposal→ specs design tasks✓

Completed Changes
────────────────────────────────────────────────────────────
  ✓ fix-search-pagination

Specifications
────────────────────────────────────────────────────────────
  ▪ auth                           2 requirements
  ▪ billing                        2 requirements
  ▪ notifications                  2 requirements
  ▪ search                         2 requirements

════════════════════════════════════════════════════════════

Use openspec list --changes or openspec list --specs for detailed views
  • New regression test renders the same dashboard however many changes are archived (#2030) in test/core/view.test.ts: renders the dashboard, adds 200 archived changes, and asserts the output is identical. It fails on main (222 lines vs 20) and passes here.
  • Store-resolution e2e tests now assert the archived change is absent from view.
  • pnpm build, tsc --noEmit, pnpm lint pass. pnpm test: 6401 passed, 2 failed. Both failures (artifact-workflow Cursor skills, config-profile project apply) reproduce on a clean main checkout and don't touch view.
  • openspec validate --specs --strict: cli-view passes.
  • Local Codex review (high effort): one P3 on docs wording, resolved by restoring the pre-feat(cli): show archived changes in list and view #399 reference text.

Notes

  • The broader question of how to stop agents from making this kind of change is tracked in Agents implement and approve changes without checking what the changed thing is for #2032. This PR only fixes view.
  • Removing the Archived Changes: N summary count is deliberate. The issue asked for a view of open work, and the spec now keeps history out entirely so there's no partial exception to argue about later.
  • Written by Claude Code (Claude Opus 5.5), reviewed locally with Codex CLI.

  • Ran pnpm changeset if this affects users, and committed the file
  • If a coding agent wrote this, named the agent and model in the Notes section, and verified the result myself

🤖 Generated with Claude Code

openspec view is a one-screen dashboard for a person reading a terminal.
#399 added every archived change to it, so projects with hundreds of
archived changes pushed active work off the screen (#2030). The dashboard
shows current work again; `openspec list --archived` still shows history.

To catch this class of mistake earlier, the cli-view spec now states who
the command serves and that it shows current work only, view.ts says the
same where the code lives, and CONTRIBUTING asks how a human view grows
as a project ages before anything is added to it.
@TabishB
TabishB requested a review from a team as a code owner October 2, 2026 16:59
@TabishB
TabishB requested review from clay-good and removed request for a team October 2, 2026 16:59
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Fission-AI/OpenSpec/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 93832790-5475-49a9-8811-78a5b4d1e75e

📥 Commits

Reviewing files that changed from the base of the PR and between 7ea14f0 and 17e1e9c.

📒 Files selected for processing (1)
  • src/core/view.ts
💤 Files with no reviewable changes (1)
  • src/core/view.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

openspec view no longer discovers, counts, or displays archived changes. Its data includes only draft, active, and completed changes. Tests, CLI documentation, and the changeset reflect this behavior.

Changes

Current-work dashboard

Layer / File(s) Summary
Dashboard data and output
src/core/view.ts
getChangesData returns only draft, active, and completed changes. The dashboard and summary no longer include archived entries or counts.
View tests and CLI documentation
test/core/view.test.ts, test/cli-e2e/view-store-resolution.test.ts, docs-lab/reference/cli.md, .changeset/view-current-work-only.md
Tests check that archived changes do not affect dashboard output, including when a store is selected through a directory alias. The CLI reference and changeset describe the updated behavior.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 17e1e

The view remains focused on current work, while archived changes remain available through list. No actionable merge-blocking risk was established.

Architecture Summary

Architecture risk: 🔵 Low · up to 7ea14

The change affects 5 systems.

Changed systems: test, CONTRIBUTING.md, docs-lab, openspec, src

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — test (service) was modified; 2 changed files map to changed impact.
  • observed — CONTRIBUTING.md (service) was modified; 1 changed file maps to changed impact.
  • observed — docs-lab (service) was modified; 1 changed file maps to changed impact.
  • observed — openspec (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in test/cli-e2e/view-store-resolution.test.ts: In the store-pointer and explicit-store cases, the test now expects view output to exclude the archive summary and archived change name instead of expecting one archived change.
  • observed — Modified behavior in test/cli-e2e/view-store-resolution.test.ts: In the directory-alias case, the test now expects view to omit the archived change name; the prior archived-summary and archive-name expectations were removed.
  • observed — Modified behavior in test/core/view.test.ts: Replaces tests of archive counts, ordering, hidden entries, missing or invalid archive paths, and unreadable-directory errors with a test that compares dashboard output before and after creating 200 archived changes.
  • observed — Modified behavior in CONTRIBUTING.md: Adds guidance for keeping human-facing views readable over time: consider how output grows as a project ages, include current work by default, put historical data behind opt-in flags, and state in the command spec Purpose when a command serves people.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue [#2030] requests a human-readable view of open and in-progress work that remains usable when many archived changes exist. openspec view now excludes archived changes from its data, counts, and…
Out of Scope Changes check ✅ Passed The source change, regression tests, store-resolution tests, CLI reference, and patch changeset all support the current-work-only behavior requested by [#2030]. The removal of archive-specific view te…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: archived changes no longer appear on the view dashboard.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openspec-cloud

openspec-cloud Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

No PR-relevant drift confirmed.

AI-generated · A citation proves the line exists, not that it makes the case — verify before acting.
No issue was confirmed at 4f08aa6; 2 requirements could not be verified.
This is not a full-repository clean result; see the check for coverage and any broader findings.
View results · Click Refresh, then Scan again in the check. Or comment /openspec-cloud.

The CLI reference describes what view prints, so it goes back to its
pre-#399 text. The why lives in the cli-view spec Purpose, the code
comment points there, and the CONTRIBUTING rule no longer names a PR.
The CONTRIBUTING section, the cli-view spec requirement, and the view.ts
comment each restated this one bug instead of guarding the general
mistake. The regression test stays as the guardrail.

@alfred-openspec alfred-openspec left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the current-work behavior, archive-scaling regression, store-resolution coverage, changeset, and canonical CLI reference. This restores a bounded, useful dashboard while keeping archive history available through the explicit list command.

@TabishB
TabishB enabled auto-merge October 2, 2026 17:31
@TabishB
TabishB added this pull request to the merge queue Oct 2, 2026
Merged via the queue into main with commit 2500d6d Oct 2, 2026
17 checks passed
@TabishB
TabishB deleted the claude/archive-history-guardrails-d27d75 branch October 2, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a command for humans to see change progress ala old openspec view

2 participants