Skip to content

Commit 80cb072

Browse files
committed
ui: separate keeper line from natural repository overview
1 parent 738f4fd commit 80cb072

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

app.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
confirmText: id('confirmText'), confirmTitle: id('confirmTitle'), confirmYes: id('confirmYes'), confirmNo: id('confirmNo'),
1616
detailStage: id('detailStage'), detailBreadcrumb: id('detailBreadcrumb'), detailNumber: id('detailNumber'),
1717
detailTitle: id('detailTitle'), detailRepo: id('detailRepo'), keeperText: id('keeperText'), detailMeta: id('detailMeta'),
18-
featureSection: id('featureSection'), featureList: id('featureList'), techSection: id('techSection'),
19-
techList: id('techList'), repoLink: id('repoLink'), pagesLink: id('pagesLink'), summarySource: id('summarySource')
18+
detailDescription: id('detailDescription'), featureSection: id('featureSection'), featureList: id('featureList'),
19+
techSection: id('techSection'), techList: id('techList'), repoLink: id('repoLink'), pagesLink: id('pagesLink'),
20+
summarySource: id('summarySource')
2021
};
2122

2223
var state = { repos: [], summaries: {}, category: 'all', query: '', sort: 'updated', selectedRow: 0, pendingRepo: null, liveApi: false };
@@ -165,10 +166,12 @@
165166
setTimeout(function(){els.confirmYes.focus();},0);
166167
}
167168
function keeperDetail(repo,s) {
168-
var base=s.detail||s.summary||repo.description||'この件は、まだ説明に使える資料がほとんどない。';
169-
if (s.confidence==='low') return '「資料が少ない。分かってる範囲だけ話す。\n'+base+'」';
169+
if (s.confidence==='low') return '「資料が少ない。分かってる範囲だけ話す。」';
170170
var leads=['調べた限りじゃ、こういう記録だ。','要点だけ言うと、こうだ。','資料を追うと、こういう話になる。'];
171-
return '「'+leads[String(repo.name||'').length%leads.length]+'\n'+base+'」';
171+
return '「'+leads[String(repo.name||'').length%leads.length]+'」';
172+
}
173+
function detailText(repo,s) {
174+
return s.detail||s.summary||repo.description||'この件は、まだ説明に使える資料がほとんどない。';
172175
}
173176
function showDetail(repo) {
174177
var s=summaryFor(repo)||{}, c=categoryOf(repo), idx=state.repos.findIndex(function(x){return x.id===repo.id;})+1;
@@ -179,6 +182,7 @@
179182
els.repoLink.href=repo.html_url||('https://github.com/'+OWNER+'/'+repo.name);
180183
els.pagesLink.hidden=true;
181184
els.pagesLink.removeAttribute('href');
185+
els.detailDescription.textContent=detailText(repo,s);
182186
meta(repo,s); features(s.features); tech(repo,s);
183187
els.summarySource.textContent=s.summary ? 'COPILOT ANALYSIS / '+fmtDate(s.generatedAt) : 'REPOSITORY METADATA';
184188
typeText(keeperDetail(repo,s));

0 commit comments

Comments
 (0)