Add checkbox to hide Merged/Done issues in Open Items - #506
Conversation
The Open Items list can surface Linear issues with a "Merged" workflow state (a started-type state, so they still match the open-issue query) even though their PR has landed. A CSS-only checkbox toggle lets users filter those out without waiting on a JS-executed partial. Co-Authored-By: Claude Sonnet 5 <[email protected]>
The checkbox and its label were inline elements, so vertical margin had no effect and the Priority heading sat flush against the filter row. Co-Authored-By: Claude Sonnet 5 <[email protected]>
There was a problem hiding this comment.
Pull request overview
Adds a client-side “Hide Merged/Done” toggle to the Open Items partial so that Linear issues lingering in “Merged” (started-type) or occasionally “Done” can be hidden without changing the server-side open-issue query behavior.
Changes:
- Added a checkbox + CSS sibling-selector rule to hide cards with
data-statusofMerged/Donein the Open Items partial. - Annotated each rendered issue card with the Linear workflow state name (
data-status=...). - Extended the Linear
get_open_issuesGraphQL selection set to fetchstate { name }.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| templates/partials/index_open_items.html | Adds the checkbox UI, sets per-card data-status, and applies CSS-only filtering for Merged/Done cards. |
| linear/issues.py | Fetches Linear issue state name so the template can render status-driven filtering. |
Suppressed comments (1)
templates/partials/index_open_items.html:28
- Same as above: prefer
default('', true)fordata-statusto avoid relying on the truthiness ofissue.stateand to keep the attribute empty whenstate.nameis missing.
<div class="card" data-status="{{ issue.state.name if issue.state else '' }}">
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| {% if priority_issues %} | ||
| {% for issue in priority_issues %} | ||
| <div class="card"> | ||
| <div class="card" data-status="{{ issue.state.name if issue.state else '' }}"> |
| state { | ||
| name | ||
| } |
There was a problem hiding this comment.
💬 Mary PR Poppins — Comment
⚪ 2 notes
Client-side Hide Merged/Done toggle on Open Items, with state { name } on the Linear query and a CSS sibling-selector filter. I'd approve on the merits, but automated approval is blocked by no Linear issue and no test coverage for the new filter — suggest a Bug Board maintainer attach a Linear issue and sign off.
Worth your attention
- ⚪ [Completeness & Correctness] [linear] ApollosProject PR has no Linear issue reference —
templates/partials/index_open_items.html:2 - ⚪ [Completeness & Correctness] [tests] Hide Merged/Done has no automated coverage —
templates/partials/index_open_items.html:2
Notes · 2
⚪ [Completeness & Correctness] [linear] ApollosProject PR has no Linear issue reference — templates/partials/index_open_items.html:2
Title, body, and commits have no ENG-/APO-/CS- key or linear.app URL, so acceptance criteria cannot be checked. Link a Linear issue if this is tracked work.
⚪ [Completeness & Correctness] [tests] Hide Merged/Done has no automated coverage — templates/partials/index_open_items.html:2
The checkbox, data-status, CSS hide rules, and state { name } on linear/issues.py:46 are untested; tests/test_linear_issue_state_filters.py:103 still passes if this feature is reverted. A render_template test plus an assert that the open-issues query selects state { name } would lock it in.
✅ Mary would approve this on the merits, but can't approve it automatically — test coverage isn't complete at the levels this change needs; no Linear issue is referenced. A second set of eyes should review and approve.
The previous push landed during an apparent Actions outage/pause and never got a CI run, leaving the PR's merge state blocked on missing required checks. No functional change. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Summary
state { name }on each Linear issue so the card can carry its status, then hides matching cards via a pure-CSS sibling-selector toggle — no<script>, since this partial is injected viafetch+innerHTMLon the index page, which wouldn't execute a script tag anyway.Test plan
pytestfull suite passes (194 passed)📸 Screenshots (demo data)
This sandbox has no
LINEAR_API_KEY/GITHUB_TOKEN, so these are captured against thereal Flask app / real Jinja templates / real CSS, with
get_open_issuesstubbed toreturn a handful of synthetic Linear issues (including Merged/Done ones) so the new
checkbox has something to filter. Everything downstream of that data — routing,
rendering, the checkbox and CSS filter under test — is untouched. Headless Playwright
run, assertions in-line (all passed).
Filter off — Merged/Done issues show:
Filter on — Merged/Done issues hidden:
🤖 Generated with Claude Code