Add repo-detail panel and /api/repo endpoint
New <repo-detail> component listens for repo:select and shows a repo's remotes, local branches (current + upstream), and recent commits. Backed by GET /api/repo (restricted to indexed repos) and read-only git readers LocalBranches/RecentCommits/RemoteDetails via repos.BuildDetail. <repo-list> highlights the selection; page docks the two panels left/right. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,14 @@
|
||||
<li><strong>Ahead / behind</strong> — commits your branch leads or trails its upstream by.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Repository details</h2>
|
||||
<p>
|
||||
Click any repository in the list to open its details on the right: its
|
||||
full path and current branch, its remotes and their URLs, every local
|
||||
branch (with the one you're on marked and its upstream shown), and the 20
|
||||
most recent commits.
|
||||
</p>
|
||||
|
||||
<h2>Background refresh</h2>
|
||||
<p>
|
||||
The dashboard refreshes on its own. By default it does <em>not</em> reach
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<!-- Web components declare themselves; the page does not micro-manage them
|
||||
(AGENT.md §1.1). Each fetches its own data on connect. -->
|
||||
<script type="module" src="/components/repo-list/repo-list.js"></script>
|
||||
<script type="module" src="/components/repo-detail/repo-detail.js"></script>
|
||||
<style>
|
||||
header {
|
||||
display: flex;
|
||||
@@ -19,7 +20,16 @@
|
||||
}
|
||||
header h1 { margin: 0; font-size: 16px; }
|
||||
header nav { margin-left: auto; }
|
||||
main { padding: 20px; }
|
||||
/* Repo list docks LEFT, detail panel docks RIGHT by default (AGENT.md §4).
|
||||
A real dockable layout is layered on later; this is the static default. */
|
||||
main {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(280px, 360px) 1fr;
|
||||
gap: 16px;
|
||||
padding: 20px;
|
||||
align-items: start;
|
||||
}
|
||||
@media (max-width: 720px) { main { grid-template-columns: 1fr; } }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -29,9 +39,8 @@
|
||||
<nav><a href="/help">Help</a></nav>
|
||||
</header>
|
||||
<main>
|
||||
<!-- The repo list docks LEFT by default (AGENT.md §4). Docking is layered on
|
||||
later; for now the list stands alone. -->
|
||||
<repo-list></repo-list>
|
||||
<repo-detail></repo-detail>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user