GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(app): unslop sessions tab with view modes, collapsible groups, and running indicator by tomlin7 · Pull Request #60374 · anomalyco/opencode Conversation
|
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 72 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work as submitted yet. bun run typecheck in packages/app fails on the new code: createStore and displayName are used in controller.tsx without being imported, so Home would throw as soon as the sessions controller is created. The project groups also don't match the types that createHomeScrollController (route.tsx:19) and the titleOpacity/setHeader props in region.tsx expect. The scroll and sticky-header code needs to handle the new group shape, not just have its types widened.
Public API: unchanged (app UI only).
Other concerns, most important first (details inline):
view.tsx reads group(), viewMode and the collapsed state once, so collapsing, switching view mode and live session updates stop working, in the date view too.HomeSessionLocation now always shows the location, including on mobile, and the hover and Alt-hold reveal no longer does anything.prompt-rail.*, virtualizer.tsx, the timeline e2e spec and two i18n keys), which is unrelated and is the same as your open #57869. Please drop it from this PR so each change can be reviewed on its own. Note that dev recently removed the turn navigator (ee8221c).Once it compiles, before/after screenshots of Home in both view modes, with a group collapsed, would help.
Related: #55446
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| const platform = usePlatform() | ||
| const queryClient = useQueryClient() | ||
|
|
||
| const [viewMode, setViewMode] = createStore<{ mode: HomeSessionViewMode }>({ mode: "date" }) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
createStore isn't imported (only solid-js is), and neither is displayName at line 461. Type-checking fails, and this throws at runtime as soon as Home builds the sessions controller. record.projectName already holds the resolved display name, so you could use that instead of displayName.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ].filter((group) => group.sessions.length > 0) | ||
| } | ||
|
|
||
| function groupSessionsByProject(records: HomeSessionRecord[]): HomeSessionProjectGroup[] { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
groups can now return HomeSessionProjectGroup[], but createHomeScrollController in home/scroll.ts (used from route.tsx) is typed and keyed on the today/yesterday/older ids for its header offsets and title fades. Widening the view's prop types to string doesn't change that, so region.tsx fails type-checking. Giving project groups the same { id, title, sessions } shape as date groups would let the scroll code and the view handle both without casts.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| </> | ||
| )} | ||
| {(group, index) => { | ||
| const isProjectGroup = props.viewMode === "project" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Index runs this callback once per slot, without tracking, so isProjectGroup, groupTitle, groupSessions and isCollapsed are captured on first render and never update. Clicking the chevron won't collapse the group, switching mode won't refresh the slots that stay mounted, and <Key each={groupSessions}> keeps the first array it got, so new or moved sessions stop showing up in the date view too. Read these inside the JSX, or as accessors such as () => props.isGroupCollapsed(group().id).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| desktop: boolean | ||
| }) { | ||
| if (!props.desktop) return null | ||
| const worktree = () => props.location.worktree |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This drops the desktop guard and the show/instantHide handling, so worktree and branch now show on every row, mobile included, and squeeze titles there. The Alt-hold and hover reveal (showLocations, show=) is still wired up but no longer does anything. If always-visible locations is the goal, the leftover reveal code should go too, and narrow layouts still need handling.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| unread: avatar.unread, | ||
| loading: avatar.loading, | ||
| open: () => props.isOpenTab(props.record), | ||
| running: () => avatar.loading() && !avatar.unread(), |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
avatar.loading() is already false whenever the session needs attention (which is what makes unread true), so running is effectively the same as loading, which the avatar already shows as busy. The dot repeats an existing indicator rather than adding information.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.