mirror of
https://github.com/logos-co/logos-chat-ui.git
synced 2026-08-27 09:11:11 +00:00
The stack's account of a failure was scattered across four writers in three processes and reachable only from a terminal, so anyone running the app from a launcher had no way to see why something did not work, and no way to attach that account to a report. The console tails the file the host assigns and filters it by domain, severity and text, with an export for the whole file or for exactly what the filters pass. Every failure the backend reports now goes to the log as well as the strip, through one reporter, which is also what stops a reason the module could not supply from rendering as a trailing colon. Only a bounded window of the file is held, shared out between domains rather than kept strictly newest first, and a domain gives up its ordinary lines before its severe ones. A writer producing thousands of lines a minute would otherwise push every quieter one out of reach within minutes, leaving a filter chip counting lines nothing could show and a header counting errors that were no longer there. What a line says about itself outranks what relayed it, so a severity the writer stated beats the pseudo level the host stamped, and a field naming a module beats the innermost scope beside it.
93 lines
4.5 KiB
Nix
93 lines
4.5 KiB
Nix
{
|
|
description = "Logos Chat UI - QML view + C++ backend module";
|
|
|
|
inputs = {
|
|
# Follow chat_module's own builder, so the logos-protocol/logos-qt-sdk
|
|
# chain matches across both.
|
|
logos-module-builder.follows = "chat_module/logos-module-builder";
|
|
# Pinned to the chat_module branch that installs the tracing subscriber and
|
|
# names a severity and a target on every line, which is what lets the
|
|
# console tell libchat's events apart from the module's own.
|
|
chat_module.url = "github:logos-co/logos-chat-module/feat/raise-default-tracing-level";
|
|
# Follow chat_module's delivery pin, so both build against the same
|
|
# delivery module.
|
|
logos-delivery-module.follows = "chat_module/logos-delivery-module";
|
|
# The design-system polish this branch pairs with
|
|
# (logos-co/logos-design-system#39), routed into the builder's input so a
|
|
# plain build renders with it.
|
|
logos-design-system.url = "github:logos-co/logos-design-system/fix/controls-polish";
|
|
chat_module.inputs.logos-module-builder.inputs.logos-design-system.follows = "logos-design-system";
|
|
# The host side of the session log: the app captures its own streams into
|
|
# <session dir>/logs and names the file to the view module, which is the
|
|
# only way the console learns where to read. Routed into the builder's
|
|
# inputs, which is where the host shell `nix run` uses is pinned.
|
|
logos-view-module-runtime.url = "github:osmaczko/logos-view-module-runtime/feat/session-log-arg";
|
|
logos-standalone-app.url = "github:osmaczko/logos-standalone-app/feat/session-log";
|
|
logos-standalone-app.inputs.logos-view-module-runtime.follows = "logos-view-module-runtime";
|
|
logos-standalone-app.inputs.logos-design-system.follows = "logos-design-system";
|
|
chat_module.inputs.logos-module-builder.inputs.logos-standalone-app.follows = "logos-standalone-app";
|
|
};
|
|
|
|
outputs = inputs@{ logos-module-builder, logos-delivery-module, ... }:
|
|
let
|
|
base = logos-module-builder.lib.mkLogosQmlModule {
|
|
src = ./.;
|
|
configFile = ./metadata.json;
|
|
flakeInputs = { delivery_module = logos-delivery-module; } // inputs;
|
|
};
|
|
|
|
nixpkgs = logos-module-builder.inputs.nixpkgs;
|
|
|
|
# `nix run .#exchange`: drive the real two-party message round-trip and hold
|
|
# the receiving window open showing the result. The doc-test launches this
|
|
# to capture one post-exchange screenshot (see doctests/chat-ui-exchange.test.yaml);
|
|
# the full flow lives in docs/two-instance-exchange.md. APP_BIN is this
|
|
# flake's standalone runner; the driver scripts are bundled from
|
|
# ./doctests/exchange.
|
|
exchangeRunner = system:
|
|
let pkgs = import nixpkgs { inherit system; };
|
|
in pkgs.writeShellApplication {
|
|
name = "chat-ui-exchange";
|
|
runtimeInputs = with pkgs; [ nodejs coreutils util-linux procps bash ];
|
|
text = ''
|
|
export APP_BIN="${base.apps.${system}.default.program}"
|
|
exec bash ${./doctests/exchange}/run-exchange-show.sh "$@"
|
|
'';
|
|
};
|
|
|
|
# `nix run .#group`: form a real three-party group conversation and hold the
|
|
# newest member's window open showing the result. The doc-test launches this
|
|
# to capture one screenshot of the formed group (see
|
|
# doctests/chat-ui-group.test.yaml). APP_BIN is this flake's standalone
|
|
# runner; the driver scripts are bundled from ./doctests/group.
|
|
groupApp = system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
runner = pkgs.writeShellApplication {
|
|
name = "chat-ui-group";
|
|
runtimeInputs = with pkgs; [ nodejs coreutils util-linux procps bash ];
|
|
text = ''
|
|
export APP_BIN="${base.apps.${system}.default.program}"
|
|
exec bash ${./doctests/group}/run-group-show.sh "$@"
|
|
'';
|
|
};
|
|
in {
|
|
type = "app";
|
|
program = "${runner}/bin/chat-ui-group";
|
|
};
|
|
in
|
|
base // {
|
|
apps = builtins.mapAttrs
|
|
(system: sysApps: sysApps // {
|
|
exchange = { type = "app"; program = "${exchangeRunner system}/bin/chat-ui-exchange"; };
|
|
group = groupApp system;
|
|
})
|
|
base.apps;
|
|
# Also a package so `nix build .#exchange` resolves: the doc-test runner
|
|
# pre-builds its launch target that way to warm the store before the run.
|
|
packages = builtins.mapAttrs
|
|
(system: sysPkgs: sysPkgs // { exchange = exchangeRunner system; })
|
|
base.packages;
|
|
};
|
|
}
|