Repository navigation
feat: a solution's declared dashboard is a tab beside it, and saas-ui says when someone last signed in - #993
Merged
antoinetoussaint-byte merged 3 commits intoOct 2, 2026
Conversation
antoinetoussaint-byte
force-pushed
the
feat/last-login-and-solution-dashboard-tab
branch
from
October 2, 2026 10:32
6ec2181 to
6dd884b
Compare
… says when someone last signed in The solution page stacked every declared dashboard above the solution, so a dashboard with nothing to show yet sat on top of what the person came for and pushed it below the fold. A solution that declares a dashboard now gets two tabs, App and Dashboard; the App panel stays mounted while the dashboard is open, so the solution keeps its state. A solution with no dashboard renders as before. saas-ui gains <LastLogin> and relativeTime: "Last login · 12 seconds ago", kept true as time passes, the exact time on the <time> element and beneath, "Never" for no recorded sign-in. The host already had two hand-written "x ago" helpers that disagree; a solution no longer writes a third. The co-versioned kit moves to 0.11.4 (@codefly-dev/ui, @codefly-dev/saas-ui). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
antoinetoussaint-byte
force-pushed
the
feat/last-login-and-solution-dashboard-tab
branch
from
October 2, 2026 10:43
6dd884b to
efd50dc
Compare
… units; a graph with no dashboard gets no tab From the review of this pull request: - LastLogin's first render read the clock and the local timezone, so a server render and the browser's hydration disagreed and React recovered. The first render now says the time in UTC on both; the relative words and the viewer's local time follow once mounted. - A parent re-rendering faster than the cadence restarted its interval every time (a new default clock function was a dependency), freezing "5 minutes ago". The clock is read through a ref and the next re-saying is scheduled from the time itself. - relativeTime rounded before choosing a unit: 59.999 seconds read "1 minute ago". It now counts whole elapsed units. - A data graph with events and metrics but no dashboard got a Dashboard tab over an empty panel. The tabs now need at least one declared dashboard. - The root frontend package pinned the kit at 0.11.3; it pins 0.11.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
react-hooks refuses a ref written while rendering (Codefly quality lint). The clock is now set in an effect declared before the schedule, so the first reading already uses it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
antoinetoussaint-byte
deleted the
feat/last-login-and-solution-dashboard-tab
branch
October 25, 2026 17:07
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.
Found in a QA pass of a solution on a hosted cell. The consumer half (a solution showing its sign-in time with
<LastLogin>) follows once this is published.Classification: feature, at the places that own it
s/[solutionId]/page.tsx). A solution cannot move it.@codefly-dev/saas-ui.1. The declared dashboard is a tab, not a block above the solution
QA saw a solution page that read, top to bottom: the dashboard's title, three widgets each saying "No data yet.", and only then the solution. The page rendered
SolutionDashboardsaboveSolutionRuntime, so a dashboard with nothing to show sat on top of what the person came for, on every visit.keepMounted, so opening the dashboard does not unmount the remote, and an open conversation or a half-typed question survives the switch.page.tsx. It does conflict textually with this PR inmodule/docs/plugin-manifest-schema.md, the frontendpackage.jsonandpackage-lock.json, and both touch the kit manifests andui-inventory.json. Whichever lands second reconciles them, keeping this PR's tab placement and feat: group a solution dashboard into declared sections a viewer can arrange #958's sections.2.
<LastLogin>in saas-ui<LastLogin at subject? label? />renders "Last login · 12 seconds ago".2026-10-02 10:00 UTC), which neither clock nor timezone can change. The relative words and the viewer's local time follow once mounted.<time dateTime title>and on the line beneath.null, or anything that is not a date) reads "Never / No sign-in is recorded yet", never "Invalid Date".relativeTime(at, now, locale?)is the words alone, counting whole units elapsed throughIntl.RelativeTimeFormat: 59.999 seconds is still "59 seconds ago".type-metric-label,type-metric-value-lg,type-caption-plain), with no new CSS.components/activity-feed.tsxandfeatures/notifications/model/transforms.ts). Moving those ontorelativeTimeis not done here.Kit version
The co-versioned kit moves to 0.11.4 (
@codefly-dev/uiand@codefly-dev/saas-ui;CODEFLY_KIT_VERSIONfollows codefly-ui'spackage.json), and so do the root frontend package's pins and lockfile entries.node scripts/ci/kit-version.mjs checkpasses with full history.Docs, inventory, stories
module/docs/plugin-manifest-schema.md: where a declared dashboard renders.packages/saas-ui/README.md: a new Audit section.ui-inventory.json: an entry foraudit/last-login.tsx.packages/saas-ui/stories/audit.stories.tsx: three stories on a fixed clock.Review
A deep review of this head found four defects, all fixed in the latest commit, each with a test that fails on the previous code: the hydration mismatch, the timer held still by parent re-renders, the empty Dashboard tab, and units rounding up early. It also found the stale root pins and the wrong #958 claim above.
Tests
s/[solutionId]/__tests__/page.test.tsx:main's page.saas-ui/src/audit/__tests__/last-login.test.tsx: the words per unit; "now" for this second and for a clock ahead; live update under fake timers; "Never" for null and for a non-date.npx vitest run --project pure, the whole project: 294 files, 3612 tests.tsc --noEmit; saas-uitscand build.scripts/check-boundaries.sh.eslinton the changed files: no errors. One warning stays, the anonymous default export in the new stories file, which matches the existingdatasources.stories.tsx.CI note
The first run's Codefly quality failed fetching the
vaultagent,cannot download agent codefly.dev/vault:0.0.37 … unexpected status code 500. That is a download error, not this change.Not verified
🤖 Generated with Claude Code