Skip to content

Feature/desktop UI - #11

Merged
oleksandkov merged 18 commits into
mainfrom
feature/desktop-ui
Nov 16, 2026
Merged

oleksandkov merged 18 commits into
mainfrom
feature/desktop-ui

Conversation

@immmn

@immmn immmn commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Зроблено 04 файл, гілка desktop-ui

iberikofer and others added 8 commits November 12, 2026 12:22
Merge main into feature/desktop-ui
Port the visual foundation of the web client into the QML layer so the
desktop screens can be built from the same vocabulary:

- Theme.qml now carries the palette, radii, motion timings and semantic
  colours from apps/web (tailwind.config.ts and globals.css), with the
  blue primary accent the web UI uses.
- Typography.qml holds the Tailwind type scale and weights.
- Icons.qml resolves names to bundled SVG files: the lucide icons used by
  the web client plus its custom inline glyphs.
- I18n.qml reports which interface language is on screen and asks the
  engine to switch; catalogs stay with the i18n module.
- Geist and Geist Mono ship with the app (the web client's files,
  repackaged from WOFF to TTF) and are loaded by the theme.

Theme and the other token files are registered as QML singletons, which
the module definition was missing.
Building blocks for the desktop screens, each matching its counterpart in
the web UI:

- text and surfaces: AppText, MonoText, DarkCard, Badge, AlertBox,
  Skeleton, AppFooter, BrandMark, UserAvatar
- actions and inputs: TactileButton (variants from the web button styles,
  hover lift and press compression), SegmentedControl, SelectCard,
  DarkTextField, DarkTextArea, SelectBox, ToggleSwitch, LanguageToggle,
  NavLink
- data display: KpiTile, ProgressRing, ScoreGauge, MessageBubble, Spinner
- layout and overlays: PageScroll (centred page column with footer and
  entrance animation), ModalOverlay, Toast, ThemedScrollBar
- decoration: Icon (runtime tinting), GradientText, SoftGlow, GlowBlob,
  DotGrid, PulseDot

The components only depend on the design tokens, not on view models.
Give each screen a C++ view model on top of the existing services, so the
QML layer stays free of business logic:

- DashboardViewModel: KPI statistics and the interview history
- SetupViewModel: track, level and language selection, session start
- ChatViewModel: transcript, sending answers, session clock, completion
- ReportViewModel: feedback report of a finished interview
- AdminViewModel: filtered and paged question bank with create, delete
  and the active switch
- SettingsViewModel: profile overrides, linked sign-in services and
  platform preferences, stored per user with QSettings
- BackendStatusViewModel: dismiss and retry state for the offline banner
- FormValidator: nickname, password and email rules of the sign-up form
- Interview, Message and Question list models for the tables and chat

When the backend cannot be reached the view models fall back to the same
sample data as the web client (DemoData), so every screen stays usable
offline. That fallback is a presentation-level stand-in and is meant to be
replaced by the embedded offline engine.

main.cpp now builds the service graph and registers the view models as
context properties.
…creens

QML ports of the web screens, bound to the view models:

- DashboardView: welcome header, KPI tiles with the daily limit ring and
  the virtualised history table with report / resume actions
- SetupView: track, seniority and language cards with the launch button
- ChatRoomView: session bar with answer count and clock, transcript with
  the thinking indicator, Enter / Shift+Enter answer box
- ReportView: animated score dial (web thresholds: 80 and 60), strengths
  and growth areas, foldable question breakdown, study links opened in
  the system browser
- AdminView: access notice, track filter, question table with the active
  switch, delete and paging, and the validated "add question" dialog
- LoginView: sign in / sign up form with validation, demo access and the
  social sign-in buttons (these explain that OAuth is not available in
  the desktop app yet)
- UserSettingsDialog: profile form with linked services and the platform
  preferences tab

All user-facing strings go through qsTr() with English source text.
…ng page

Replace the placeholder shell with the web client's layout:

- Navbar: brand, primary navigation, admin view switch, backend status
  chip, language toggle and the profile menu (settings, history, demo
  role switch, help, sign out) or the Sign In button
- StatusBanner: backend connectivity warning with retry and dismiss
- LandingView: hero, interactive interview preview with track tabs,
  metrics strip, career tracks, architecture highlights and final CTA
- Main.qml routes the six views, overlays the sign-in page and the
  settings dialog, and shows auth notices as a toast
Add 48 GoogleTest cases for the UI layer, run against the existing mock
HTTP server:

- view models: data from the API, the sample-data fallback when a request
  fails, skipping the network while the backend is known to be down,
  server-side rejections, optimistic updates and their rollback
- chat: sending answers, scripted replies of a local session in order,
  resuming a transcript, completion and navigation to the report
- settings: profile overrides, linked services and preferences persisted
  per user (in a temporary INI file, not the real settings)
- list models: role names and value mapping the QML delegates rely on
- form validation rules for nickname, password and email

The view model sources are compiled into the test target next to the
service sources.
Several view model setters took a parameter with the same name as the
class accessor (theme, email, direction, loading, ...). MSVC reports that
as hiding a class member at /W4, so the parameters get distinct names.
No behaviour change.
@immmn
immmn force-pushed the feature/desktop-ui branch from 98cc6eb to 2f704fe Compare November 13, 2026 04:21
… website

The first port copied the web pages one to one: top navbar, landing page,
footer and narrow centred columns, plus controls that did nothing in the
desktop app. Rework the shell and the screens around desktop patterns and
keep only features that work.

Shell
- Sidebar navigation (expanded list or icon rail, Ctrl+B) with Home, New
  interview, the running interview (live dot and answer count), the
  question bank for admins, the account and a server status indicator
- Screens fill a rounded content panel; each has a header with its title
  and actions (AppPage)
- Application icon (window, taskbar and the .exe) and a start-up splash
- Signed out, the window shows a full-size sign-in screen
- Shortcuts: Ctrl+1 Home, Ctrl+N / Ctrl+2 new interview, Ctrl+3 current
  interview, Ctrl+, account; window size and sidebar state are remembered

Screens
- Home: KPI tiles and a history table that fills the window; rows open
  the report or resume the interview
- New interview: choices on the left, live session summary and Start on
  the right
- Interview: full-height transcript, typing indicator, Finish in the header
- Report: score and verdict next to the question breakdown and study links
- Question bank: track filter chips and a full-height table
- Account: profile, admin view switch, demo role switch, server check,
  shortcut list, sign out
- Screens running on sample data carry a "Demo data" / "Offline demo" badge
  and switch to it as soon as the server is known to be unreachable

Removed (no working backend behind them)
- Landing page, navbar, footer, backend banner, settings dialog
- OAuth buttons, profile editing, linked services, theme / sound / AI
  persona switches and the language toggle (no catalogs yet)
- SettingsViewModel is now a read-only account view; BackendStatusViewModel
  loses the banner dismiss state; unused icons are deleted

Dates in tables are numeric so they no longer mix system-locale month
names into the English UI. Tests updated for the slimmer view models and
the new chat session state.
…and splash

- Sign-in is a compact centred window with the app mark, one form and the
  demo access instead of a marketing half with a slogan and bullet points.
- AppToolTip replaces the stock white Basic tooltip on every control; the
  collapsed sidebar shows it to the right of the rail.
- The splash no longer draws a progress line that measures nothing, is
  shorter and can be skipped with a click.
- The finish button is solid emerald and the chat buttons lose their glow.
- The sidebar app mark no longer triggers a recursive layout warning.
…taken

- An interview finished offline joins the demo history, so Home lists it
  and the numbers on Home are counted from the same list.
- Its report is built from its own transcript: the questions that were
  asked, one score per answer by how detailed it is, and a summary that
  says so. The sample interviews keep reports that match their rows.
- An interview the server has not evaluated yet is scored the same way
  instead of showing an unrelated sample.
- The report header names the track, level and date of the interview.
- Offline follow-up questions belong to the chosen track.
- The "left today" ring shows what is left, like the number next to it.
- Starting an interview while the backend is known to be down no longer
  waits for a request to time out.
…server

Deleting a question in the bank now takes the row out at once and shows
a "Question ... deleted · Undo" toast. The server is told only after the
5 second undo window, or earlier when another delete, a refresh or a
filter change needs the list. If the server keeps the question, the row
comes back and the toast says why.

The "N questions" count follows deletes, undos and new questions, the
empty table hides its column headers, and the empty states of the bank
and Home are centred again.
…nk copy

The demo accounts show as "Demo admin" and "Demo candidate", the names
the sign-in buttons use, instead of the placeholder "Mock ..." names.
The sign-in card says "Welcome back" rather than repeating "Sign in" a
third time, the question bank says "1 question" in the singular, the new
question field has a real example instead of "Enter technical question
prompt...", and the shortcut list mentions Ctrl+2 next to Ctrl+N.
- Chat messages can be selected and copied.
- The "Answer at least one question first" hint now shows over the
  disabled Finish button.
- Level and track cards keep their titles at the top when a subtitle
  wraps, so a row lines up.
- The keyboard focus ring is brighter.
- Icon-only controls (send, delete, active switch, server status,
  sidebar collapse, password reveal) have accessible names.
…e loaded

A report the server could not return (an error, a timeout, or the backend
already known to be down) fell back to the demo report builder. For an
interview it does not know, that builder scores an empty transcript, so a
real interview showed "0 points, this interview has no answers" under a
"Demo data" badge.

Such a report now says why it is unavailable and offers "Try again". While
the backend is down the button asks the server first, and the report loads
by itself once the server answers. Sample and offline interviews still get
their demo reports.
… closes

A deleted question reaches the server only after its 5 second undo
window. Closing the app inside that window left the request to the
destructor, when the process is already exiting and the request most
likely never leaves, so the question came back on the next start.

Closing the window now sends the waiting delete at once and closes when
the server has answered, or after 4 seconds at the latest.
The splash shows the icon, the name and the blue progress line again for
1.5 seconds, as in the remake. A click still skips it.
- The tagline is set in the interface font instead of monospace and in a
  lighter grey, which brings it to readable contrast.
- The name and the tagline sit together as one group, with the icon above
  and the progress line below spaced apart.
- The mark settles into place without overshooting, the full progress
  line holds for a moment, and the mark eases forward as the splash fades
  out.
@oleksandkov
oleksandkov merged commit 5aec21f into main Nov 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants