Skip to content

Ticking grid for live blotters in Web Console notebooks #132

Description

@bluestreak01

Summary

A ticking grid cell for Web Console notebooks: a live table such as a trade blotter, positions or quotes board that updates in place as new data arrives. Rows follow LATEST ON semantics, so new keys are appended and existing keys are updated. Users add computed columns and formatting rules with SQL-like expressions, color cells by hand or by rule, and turn rules into alerts.

Current Limitations

  • Auto-refresh re-runs the whole query and re-renders the result; rows do not update in place and there is no notion of a key
  • Result grids have no computed columns, conditional formatting or manual cell coloring
  • Nothing in the console reacts when a value crosses a threshold
  • Sorting, filtering and layout are lost when a cell refreshes

Features

Feature Description
Keyed live rows Choose key columns; the grid keeps one row per key, appends new keys and updates existing ones, modelled on LATEST ON
Incremental updates Each poll fetches only rows newer than the last seen timestamp and applies them as upserts, so the grid ticks without re-running the full query
Computed columns Same-row expressions such as price * quantity AS notional, written in SQL-like syntax and evaluated in the browser
Formatting rules Conditional formatting per column, including cross-row rules that compare a cell with its previous value to flash on tick up or tick down
Manual coloring Paint individual cells or rows; colors are attached to the row key so they follow the row as it updates
Alerts Any rule can raise an alert: an in-console notification, a browser notification and an optional sound, with a log of fired alerts in the cell
Grid interactions Sort by any column or by activity (most recently updated first), filter, freeze columns, pin rows, totals row, pause and resume, flash on change, per-column number and time formatting
Notebook cell A first-class cell type: its query, keys, rules, colors and layout are saved and exported with the notebook, and coding agents can build and edit it through the MCP server

How it works

  1. The user picks a query, the key columns and a designated timestamp column.
  2. The cell polls on the notebook's refresh schedule, asking only for rows newer than its watermark.
  3. New rows are merged by key: unknown keys are appended, known keys are updated in place, and changed cells are flashed.
  4. Computed columns, formatting rules and alerts are re-evaluated for the changed rows only.
  5. Sort, filter and frozen columns persist across updates, and the grid can be paused to inspect a moment in time.

The grid is built for high update rates with virtualized rows and batched rendering, and needs no tuning from the user. Polling is the first transport; a separate item moves the Web Console from HTTP to QWP, which prepares the grid for push updates when pub-sub (#111) lands.

Example

Illustrative rules on a trade blotter, keyed by order_id:

-- computed column
price * quantity AS notional

-- conditional formatting
price > 100          -> background: red
price > prev(price)  -> flash: green
price < prev(price)  -> flash: red

-- alert
notional > 1_000_000 -> notify "Large fill: {symbol} {notional}"

Benefits

  • Blotters without a front-end project — a live trading or telemetry board is one notebook cell, next to the SQL that feeds it
  • Rows you can follow — keyed updates keep each order, symbol or device on the same row instead of reshuffling the table
  • Spreadsheet-style logic on live data — computed columns and color rules without exporting to Excel
  • Eyes-off monitoring — alerts fire when a rule trips, so nobody has to watch the screen
  • Shareable and agent-buildable — the whole configuration travels with the notebook and can be created by an AI agent

Scope

  • Keyed live grid cell with incremental polling and in-place updates
  • Computed columns and formatting rules, including previous-value comparisons
  • Manual cell and row coloring attached to row keys
  • Alerts: in-console, browser notification, sound, alert log
  • Grid interactions: sort by activity, filter, freeze, pin, totals, pause, flash
  • MCP tools for creating and editing ticking grid cells

Builds on #125 (Web Console notebooks with AI agent integration).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    UIWeb Console related featuresenterpriseFeatures specific to QuestDB Enterprise

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions