Skip to content

Project Info Panel โ€” Lantern Control Extension โ€‹

Date: 2026-03-28 Status: Approved Scope: VS Code extension (tooling/vscode-extension/)


Summary โ€‹

Add a read-only "Project Info" dashboard view to the Lantern Control sidebar. It shows the current milestone progress, git branch, open PR for the branch, and app version โ€” all at a glance without leaving the editor.

Motivation โ€‹

Developers need quick visibility into where the project stands (which milestone, how far along) and where their current branch fits (PR status, version). Currently this requires switching to GitHub or running CLI commands.

Design โ€‹

New View: lanternControl.projectInfo โ€‹

Positioned first in the Lantern Control sidebar (before Quickstart).

Tree structure:

โ–ผ Project Info
  โ”œโ”€โ”€ Milestone: Prototype          47% (14/30)
  โ”œโ”€โ”€ Branch: copilot/attach-tasks-...
  โ”œโ”€โ”€ PR: #301 โ€” feat: auto-assign...   OPEN
  โ”œโ”€โ”€ Version: 0.1.0
  โ””โ”€โ”€ Last refreshed: 2 min ago

Tree Items โ€‹

ItemIconDescriptionTooltipClick Action
Milestone$(milestone)47% (14/30)Full milestone name, open vs closed issue countsNone
Branch$(git-branch)Full branch nameBranch nameNone
PR$(git-pull-request)#301 โ€” title STATEPR title, number, URLOpens PR in browser
Version$(tag)Version from root package.jsonVersion stringNone
Last refreshed$(clock)Relative time since last fetchAbsolute timestampNone

When no PR exists for the current branch: PR: No open PR with $(git-pull-request) icon.

Milestone Detection โ€‹

Fetch all open milestones via gh api repos/{owner}/{repo}/milestones. Select the "active" milestone using this heuristic: the milestone with the highest total issue count (open_issues + closed_issues) that still has open_issues > 0. This correctly identifies "Prototype" today and will naturally shift as work moves to Alpha/Beta.

Data Sources โ€‹

DataSourceMethod
Milestone + progressGitHub APIgh api repos/{owner}/{repo}/milestones via execSync
Current branchLocal gitgetCurrentBranch() (existing lib/gitBranch.js)
Open PR for branchGitHub CLIgh pr list --head <branch> --json number,title,url,state via execSync
App versionLocal filesystemreadPackageJson() (existing lib/packageReader.js)

Refresh Behavior โ€‹

  • On activation: Full fetch of all data
  • On branch change: Piggyback on existing 10-second branch polling in extension.js. When branch changes, trigger a full refresh.
  • Manual: Refresh button in the view title bar (standard lanternControl.refreshProjectInfo command)
  • No periodic auto-refresh for GitHub data (avoids rate limits, data changes infrequently)

Error Handling โ€‹

If gh CLI is unavailable or authentication fails, milestone and PR items display "unavailable" as their description. Branch and version always work since they are local. No errors thrown โ€” the panel degrades gracefully.

New Files โ€‹

  • src/providers/ProjectInfoProvider.js โ€” TreeDataProvider following the same pattern as QuickstartProvider.js. Contains ProjectInfoItem (simple TreeItem subclass) and the provider class.
  • src/lib/githubData.js โ€” Wraps gh CLI calls. Exports fetchActiveMilestone(cwd) and fetchBranchPR(cwd, branch). Returns parsed objects or null on failure.

Modified Files โ€‹

  • package.json โ€” Add lanternControl.projectInfo view at position 0 in the lanternControl views array. Add lanternControl.refreshProjectInfo command and its menu entry.
  • src/extension.js โ€” Import and instantiate ProjectInfoProvider. Register tree view and refresh command. Hook into branch polling to detect branch changes and trigger provider refresh.

What This Does NOT Include โ€‹

  • No periodic auto-refresh of GitHub data
  • No milestone editing or switching
  • No clickable actions except PR โ†’ open in browser
  • No configuration settings

Built with VitePress