csr tangled client in solid-js
15

Configure Feed

Select the types of activity you want to include in your feed.

show latest commit in subpaths, dont show empty README

dawn (May 19, 2026, 11:01 AM +0300) 54f2bace bd468bb3

+111 -14
+44
AGENTS.md
··· 188 188 - `src/pages/repo/pulls.tsx`: pull routes and patch/diff UI. 189 189 - `src/pages/repo/issues.tsx`: issue routes. 190 190 - `src/lib/api/core.ts`: compatibility implementation backend; prefer new domain modules for new API surfaces. 191 + 192 + 193 + <!-- headroom:rtk-instructions --> 194 + # RTK (Rust Token Killer) - Token-Optimized Commands 195 + 196 + When running shell commands, **always prefix with `rtk`**. This reduces context 197 + usage by 60-90% with zero behavior change. If rtk has no filter for a command, 198 + it passes through unchanged — so it is always safe to use. 199 + 200 + ## Key Commands 201 + ```bash 202 + # Git (59-80% savings) 203 + rtk git status rtk git diff rtk git log 204 + 205 + # Files & Search (60-75% savings) 206 + rtk ls <path> rtk read <file> rtk grep <pattern> 207 + rtk find <pattern> rtk diff <file> 208 + 209 + # Test (90-99% savings) — shows failures only 210 + rtk pytest tests/ rtk cargo test rtk test <cmd> 211 + 212 + # Build & Lint (80-90% savings) — shows errors only 213 + rtk tsc rtk lint rtk cargo build 214 + rtk prettier --check rtk mypy rtk ruff check 215 + 216 + # Analysis (70-90% savings) 217 + rtk err <cmd> rtk log <file> rtk json <file> 218 + rtk summary <cmd> rtk deps rtk env 219 + 220 + # GitHub (26-87% savings) 221 + rtk gh pr view <n> rtk gh run list rtk gh issue list 222 + 223 + # Infrastructure (85% savings) 224 + rtk docker ps rtk kubectl get rtk docker logs <c> 225 + 226 + # Package managers (70-90% savings) 227 + rtk pip list rtk pnpm install rtk npm run <script> 228 + ``` 229 + 230 + ## Rules 231 + - In command chains, prefix each segment: `rtk git add . && rtk git commit -m "msg"` 232 + - For debugging, use raw command without rtk prefix 233 + - `rtk proxy <cmd>` runs command without filtering but tracks usage 234 + <!-- /headroom:rtk-instructions -->
+67 -14
src/pages/repo/code.tsx
··· 47 47 ); 48 48 }; 49 49 50 + const commitSummary = (message: string) => message.trim().split('\n')[0] || 'no commit message'; 51 + 52 + const readmeIsAvailable = ( 53 + readme: { filename: string; contents: string } | undefined, 54 + entries: Array<{ name: string; mode: string }>, 55 + ) => { 56 + if (!readme) return false; 57 + if (readme.contents.trim().length > 0) return true; 58 + 59 + const filename = readme.filename.trim().toLowerCase(); 60 + return filename.length > 0 && entries.some((entry) => !entry.mode.startsWith('004') && entry.name.toLowerCase() === filename); 61 + }; 62 + 63 + const TreeLatestCommitPanel: Component<{ 64 + repo: Parameters<typeof treeHref>[0]; 65 + commit: { 66 + hash: string; 67 + message: string; 68 + when: string; 69 + author?: { 70 + email: string; 71 + name: string; 72 + }; 73 + }; 74 + }> = (props) => ( 75 + <div class="pb-2 mb-3 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between flex-wrap text-sm gap-2"> 76 + <div class="flex min-w-0 flex-wrap items-center gap-1"> 77 + <Show 78 + when={props.commit.author?.email?.startsWith('did:') ? props.commit.author.email : undefined} 79 + fallback={<PlaceholderAvatar size="size-6" iconSize="size-4" />} 80 + > 81 + {(did) => <Avatar did={did()} size="size-6" />} 82 + </Show> 83 + <span class="font-medium text-gray-700 dark:text-gray-200">{props.commit.author?.name || 'unknown author'}</span> 84 + <span class="select-none text-gray-400 dark:text-gray-500">·</span> 85 + <A 86 + href={`/${props.repo.owner.handle}/${props.repo.slug}/commit/${props.commit.hash}`} 87 + class="min-w-0 truncate no-underline hover:underline text-gray-900 dark:text-white" 88 + > 89 + {commitSummary(props.commit.message)} 90 + </A> 91 + <span class="select-none text-gray-400 dark:text-gray-500">·</span> 92 + <span class="text-gray-500 dark:text-gray-400">{formatRelativeTime(props.commit.when)}</span> 93 + </div> 94 + <A 95 + href={`/${props.repo.owner.handle}/${props.repo.slug}/commit/${props.commit.hash}`} 96 + class="inline-flex w-fit items-center rounded bg-gray-100 px-2 py-1 font-mono text-xs text-gray-700 no-underline hover:underline dark:bg-gray-900 dark:text-gray-300" 97 + > 98 + {props.commit.hash.slice(0, 8)} 99 + </A> 100 + </div> 101 + ); 102 + 50 103 const LoadingFilePath: Component<{ 51 104 repo: Parameters<typeof treeHref>[0]; 52 105 refName: string; ··· 319 372 </div> 320 373 </div> 321 374 322 - <Show when={data.tree.readme}> 323 - <ReadmeCard 324 - filename={data.tree.readme!.filename} 325 - markdown={data.tree.readme!.contents} 326 - /> 327 - </Show> 375 + <Show when={readmeIsAvailable(data.tree.readme, sortedFiles) && data.tree.readme}> 376 + {(readme) => <ReadmeCard filename={readme().filename} markdown={readme().contents} />} 377 + </Show> 328 378 </> 329 379 ); 330 380 })()} ··· 575 625 </a> 576 626 </div> 577 627 578 - <Show when={isNestedTreePath}> 579 - <div class="px-6"> 580 - <PathBreadcrumbs repo={repo} refName={treeRef} path={treePath} withDivider /> 581 - </div> 582 - </Show> 628 + <Show when={isNestedTreePath}> 629 + <div class="px-6"> 630 + <PathBreadcrumbs repo={repo} refName={treeRef} path={treePath} withDivider /> 631 + <Show when={tree.lastCommit}> 632 + {(commit) => <TreeLatestCommitPanel repo={repo} commit={commit()} />} 633 + </Show> 634 + </div> 635 + </Show> 583 636 584 637 <div class={clsx('untangled-repo-overview px-6 py-4', isNestedTreePath && 'untangled-repo-overview--path')}> 585 638 <div class="untangled-file-tree-pane min-w-0 pr-0 md:pr-6"> ··· 729 782 </div> 730 783 </div> 731 784 732 - <Show when={tree.readme}> 733 - <ReadmeCard filename={tree.readme!.filename} markdown={tree.readme!.contents} /> 734 - </Show> 785 + <Show when={readmeIsAvailable(tree.readme, sortedFiles) && tree.readme}> 786 + {(readme) => <ReadmeCard filename={readme().filename} markdown={readme().contents} />} 787 + </Show> 735 788 </> 736 789 ); 737 790 })()}