Skip to content

feat(ghdash): per-view section lists for gh-dash profiles - #1596

Merged
c-vigo merged 3 commits into
devfrom
feature/1595-ghdash-profile-issues-sections
Sep 1, 2026
Merged

c-vigo merged 3 commits into
devfrom
feature/1595-ghdash-profile-issues-sections

Conversation

@c-vigo

@c-vigo c-vigo commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Description

vigos.ghdash.profiles named one section list per profile and the wrapper wrote
it to both prSections and issuesSections. PR and issue queues are not
filtered alike — review-requested:@me, draft:false, reviewed-by:@me either
do not apply to issues or mean something else — so a profile written for pull
requests landed a permanently empty section under Issues, and the only escape
was writing the profile down to the intersection of what both views understand.

The quieter half: templateText set both keys unconditionally, so a consumer
who tuned programs.gh-dash.settings.issuesSections kept it for bare gh-dash
and lost it in every gh-dash-repo launch, default included — which is
the launch path a vigos.sesh layout's prs window actually uses.

Type of Change

  • feat -- New feature

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • profiles takes either shape. A profile is still one entry — one
    dashboard — but may now be { prSections; issuesSections; } instead of a
    bare list. issuesSections = null (the default) mirrors prSections;
    [ ] leaves the issues view empty rather than wrong. A bare list coerces to
    today's meaning, so nothing written against [FEATURE] vigos.ghdash: per-project scope and section profiles #1586 changes.
    • Implementation note: the issue's sketch used coercedTo sectionList …, but
      nixpkgs asserts coercedType.getSubModules == null, so the source type is
      shape-only (listOf anything) and the entries are type-checked by
      prSections after coercion — a malformed section still fails at eval
      (verified: profiles.bad = [ { title = "X"; typo = true; } ] errors with
      The option `vigos.ghdash.profiles.bad.prSections."[definition 1-entry 1]".typo` does not exist).
  • templateText takes the pair and stops folding one list into both; issue
    filters are scope-free and get the __GH_DASH_SCOPE__ placeholder exactly as
    PR ones do.
  • default stops overwriting the consumer's issues view. The module only
    mkDefaults programs.gh-dash.settings.issuesSections, so anything else is
    the consumer's own dashboard and passes through verbatim — those sections
    carry the scope their author chose; one that wants to follow the launch repo
    writes the placeholder itself (documented on the option).

Scope note: the same "respect the consumer's value" rule is deliberately not
applied to prSections, per the issue — the generated sections are PR-shaped
and scoping them to the launch repo is the wrapper's whole purpose.

Changelog Entry

### Added

- **A `vigos.ghdash` profile can now filter its issues view separately**
  ([#1595](https://github.com/vig-os/devkit/issues/1595))
  - A profile named one section list and the wrapper wrote it to both views,
    but PR and issue queues are not filtered alike: the qualifiers that make a
    PR profile useful (`review-requested:@me`, `draft:false`) either do not
    apply to issues or mean something else, so a profile written for pull
    requests landed a permanently empty section under Issues — the only escape
    was writing the profile down to what both views understand
  - A profile may now be `{ prSections; issuesSections; }` instead of a bare
    list, with `issuesSections = [ ]` leaving the issues view empty rather
    than wrong; issue filters are scope-free and get the launch-time scope
    exactly as PR ones do
  - The `default` profile keeps a consumer-set
    `programs.gh-dash.settings.issuesSections` instead of overwriting it —
    those sections carry the scope their author chose, and one that wants to
    follow the launch repo writes the `__GH_DASH_SCOPE__` placeholder itself.
    Since the `prs` window of a `vigos.sesh` layout runs `gh-dash-repo`, that
    was the launch path where the setting silently disappeared
  - Backward compatible: a bare list still means both views, so every profile
    written against #1586 renders byte-identically

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

uv run pytest tests/test_flake_checks.py — 25 passed (includes
nix flake check and the ci-hm-unstable eval). prek run --all-files green,
no file modified.

Three tests, TDD (RED commit 7a9aaa16, GREEN 12a64b9a):

  • test_ghdash_profiles_render_templates — extended with bare-list parity:
    default and a list-shaped profile must render prSections == issuesSections.
  • test_ghdash_profile_splits_pr_and_issue_sections — a split profile keeps the
    two lists apart and scopes the issues list; issuesSections = [ ] stays empty.
  • test_ghdash_default_profile_keeps_consumer_issue_sections — a consumer-set
    issuesSections survives into default.yml verbatim while the generated PR
    sections still carry the placeholder. This needed _home_module_eval to grow
    an extra argument for module attributes outside vigos.<module>.

Manual Testing Details

Backward compatibility checked byte-for-byte, not just by shape: rendered
default.yml, shared.yml (a bare-list profile with a limit) and
programs.gh-dash.settings from a git worktree at origin/dev and from this
branch, with the same repoFilters — diff is empty.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

Option documentation lives in the module's description/example (there is no
docs/ page for vigos.ghdash), both updated. The scaffold's changelog mirror
(assets/workspace/.devcontainer/CHANGELOG.md) is the sync-manifest hook's
output, not a hand edit.

Refs: #1595

@c-vigo
c-vigo merged commit 2b7ae1f into dev Sep 1, 2026
14 checks passed
@c-vigo
c-vigo deleted the feature/1595-ghdash-profile-issues-sections branch September 1, 2026 13:59
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.

1 participant