fix: terminal full-width, flow line fade sync, CONTRIBUTING staleness#45
Merged
johnnichev merged 1 commit intomainfrom Apr 7, 2026
Merged
Conversation
Three small fixes from the latest review pass. 1. **pip install terminal full-width on desktop** (Image #32): Removed `max-width: 440px` from `.terminal-install`. The terminal now spans 100% of the hero-content column, matching the width of the "Try the Builder" + "Read the Docs" button row directly below it. The hero grid (1fr 1fr split until 1024px) still constrains the column width itself, so this doesn't span the entire viewport on wide screens — it spans the column where the buttons live, which is what aligns them. 2. **SVG flow lines lingering after nodes fade out** (Image #33): Root cause: in the hero flow scene transitions, nodes fade via CSS `transition: opacity 0.3s` when `el.style.opacity = '0'`, but the SVG `<line>` elements (and `<circle>` pulses inside the same `<svg>`) had no fade animation — they stayed fully opaque until the next scene's `buildScene()` cleared the SVG via `svg.textContent = ''`. The visible result: nodes vanish at t=300ms, lines hang in the air alone for ~100ms, then snap to the next scene at t=400ms. Fix: added `transition: opacity 0.3s var(--ease)` to `.hf-svg`, and in playScene's "all done" handler set `svg.style.opacity = '0'` at the same time as `el.style.opacity = '0'` on the nodes. In buildScene, reset `svg.style.opacity = '1'` before drawing the next scene's lines so the new content fades in cleanly. Lines and nodes now vanish on the same curve. 3. **CONTRIBUTING.md stale facts** (user pointed out the version): The user noticed v0.19.2 in the header. While I was there I caught several other stale items and fixed them in the same pass: - Header version: v0.19.2 → v0.20.1 (current) - Header Python: "3.9+" → "3.9 – 3.13" (matches actual classifiers) - Header test status: "100%" → "95% coverage" (matches reality) - Project structure: "24 pre-built tools" → "33 pre-built tools" (verified via `grep -c '^@tool' src/selectools/toolbox/*.py`) - Project structure: "61 numbered examples (01–61)" → "88 numbered examples" (verified via `find examples -maxdepth 1 -name '*.py' | wc -l`) - Release script examples: 0.5.1 → 0.20.2 (current minor + 1) - Test command: `python tests/test_framework.py` → `pytest tests/` (the legacy single-file runner doesn't exist anymore) - Provider test path: `tests/test_framework.py` → `tests/providers/ test_your_provider.py` (current convention) - Section header: "Adding RAG Features (New in v0.8.0!)" → "Adding RAG Features" (v0.8.0 was many releases ago) The biggest substantive fix: rewrote the "Adding a New Tool" example. The old example used `Tool(name=..., parameters=[ ToolParameter(...)])`, which is the legacy class-based API. Selectools has used the `@tool()` decorator pattern for many versions now, where the function signature and docstring are introspected automatically. The old example was actively misleading new contributors into using a deprecated API. New example shows the modern decorator pattern with proper docstring conventions. What's NOT in this PR: - Full rewrite of the project structure block — only the genuinely stale numeric facts (24, 61) were fixed; the listed file names are still mostly accurate and a full architectural audit is out of scope for "the version is outdated" - No CHANGELOG entry — these are doc fixes, not user-facing code - No version bump
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three small but distinct fixes from the latest review pass.
Issue 1 — pip install terminal full-width on desktop (Image #32)
Problem: The terminal install component was capped at `max-width: 440px`, leaving it visibly narrower than the "Try the Builder" + "Read the Docs" button row directly below it on desktop. The misalignment looked unintentional.
Fix: Removed the `max-width: 440px` constraint. The terminal now spans 100% of the hero-content column. The hero grid (1fr 1fr split until the 1024px breakpoint) constrains the column itself, so the terminal doesn't span the entire viewport on wide screens — it spans the column where the buttons live, which is what aligns them.
```diff
.terminal-install {
width: 100%;
...
}
```
Issue 2 — SVG flow lines lingering after nodes fade out (Image #33)
Root cause traced through the JS: In the hero flow scene transitions, nodes fade out via the CSS rule `transition: opacity 0.3s` when the JS sets `el.style.opacity = '0'`. Meanwhile, the SVG `` elements (and the `` pulses inside the same SVG) had no fade animation — they stayed fully opaque until the next scene's `buildScene()` cleared the SVG via `svg.textContent = ''`.
The visible result on a typical scene transition:
Fix (3 small changes):
Added an opacity transition to `.hf-svg`:
```css
.hf-svg {
...existing rules...
transition: opacity 0.3s var(--ease);
}
```
In `playScene`'s "all done" handler, fade the SVG at the same time as the nodes:
```diff
nodeEls.forEach(function(el) { el.style.opacity = '0'; });
+svg.style.opacity = '0';
delay(400, onDone);
```
In `buildScene` (called by the next scene), reset SVG opacity to 1 before drawing the new lines:
```diff
nodesEl.textContent = '';
svg.textContent = '';
+svg.style.opacity = '1';
```
Lines and nodes now fade out together on the same 0.3s curve. No more lingering ghost lines.
Issue 3 — CONTRIBUTING.md staleness pass
The user asked me to "verify the contributing tab and update since I see that at least the version is already outdated." I caught the version stale fact and several others while I was there:
Verification of the new numbers:
```bash
$ find examples -maxdepth 1 -name '.py' | wc -l
88
$ grep -c '^@tool' src/selectools/toolbox/.py | awk -F: '{sum+=$2} END {print sum}'
33
```
The biggest substantive fix: rewrote the "Adding a New Tool" example. The old example used the legacy class-based API:
```python
return Tool(
name="your_tool",
description="...",
parameters=[
ToolParameter(name="param1", param_type=str, required=True),
...
],
function=your_tool_implementation,
)
```
Selectools has used the `@tool()` decorator pattern for many versions now, where the function signature and docstring are introspected automatically. The old example was actively misleading new contributors into using a deprecated API. The new example shows the modern decorator pattern with proper docstring conventions:
```python
from selectools import tool
@tool()
def your_tool(param1: str, param2: int = 10) -> str:
"""One-line description.
```
Plus a complete usage example showing how to wire the tool into an Agent.
Test plan
Desktop:
CONTRIBUTING.md:
Regression:
What's NOT in this PR