# Session Transitions

_Peios / Using Peios / Desktop Basics_

> Understand startup, reconnect, and shutdown displays.

Fenestra's browser page connects the sign-in screen to the desktop and
shows when a session or machine becomes unavailable. These displays
communicate session state; they do not authorize a restart or prove that a
machine has powered off.

## Entering the desktop

When GXWI passes its sign-in animation state to the page, Fenestra shows
the arrival transition while the shell starts. Without that saved state,
the page displays the desktop directly. Reduced-motion preferences shorten
the movement.

The first-session greeting is selected when Fenestra creates the account's
`CurrentUser\Software\Fenestra` key. An existing key means the session is
not treated as the first, even if another application created the key.
A registry failure also uses the non-first-session behavior. Only the
session's first browser attachment receives the first-session flag.

The arrival display waits for shell panels and backgrounds to become
ready. A shell can declare how many parts to expect. Without that count,
the page uses readiness and a settling interval. A 10-second upper bound
prevents the arrival display from waiting indefinitely for a broken shell.
The desktop appearing after that bound is not evidence that every shell
program started successfully.

## Reconnecting a page

The compositor sends a complete surface list and the active shortcut map
when a page attaches. A disconnected page reconnects and receives another
snapshot. A page that falls too far behind the compositor's change stream
is disconnected so it can reconnect from a complete snapshot.

An application surface lasts while its application connection exists.
Reconnecting a browser does not recreate a process that has exited. Raw
application pages can also have browser-local state that does not survive
a page reload; shared live application state belongs to the application
process.

## Restart, shutdown, and loss of contact

A trusted shell can announce a restart or shutdown to every page showing
its session. The page displays the departure animation and checks whether
GXWI answers again. The shell remains responsible for requesting the
machine operation from the service manager.

If the shell withdraws its announcement after a refusal, the page returns
to the desktop and stops the outstanding availability check. Delayed
callbacks from that canceled attempt cannot redirect the restored desktop
or interfere with a later attempt. A shutdown message in the browser is
not an independent hardware power-state check.

When a session connection closes and GXWI also stops answering, the page
reports loss of contact and waits for the address to return. This can mean
a machine restart, a network interruption, or another availability problem.
It does not identify the cause. When the expected reconnect conditions are
met, the page returns to sign-in.
