ui: aggregated read on top, hide stale rows, wire /log tone toggle; prompts v8

- dashboard grid: explicit "header" area as the first row so the
    aggregated read panel renders at the top instead of being
    auto-placed after the named areas.
  - indicators: hide rows flagged stale (older than the group's
    freshness threshold). Server still computes stale_symbols;
    rendering can be re-enabled by removing the
    `{% if not is_stale %}` wrapper in indicators.html.
  - /log: add tone-changed to #log-content's hx-trigger and include
    it in cassandraSetTone's selector list — toggling Novice /
    Intermediate on the Log page was previously a no-op.
  - prompts: bump PROMPT_VERSION 7→8. Strengthen the rational-vs-
    irrational framing in the strategic-log system prompt from
    aspirational to mandatory ("a paragraph without both lenses must
    be rewritten"). Require the same lens in the per-group summary,
    cross-asset aggregate, and portfolio commentary overrides.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Giorgio Gilestro 2026-05-23 19:36:04 +02:00
parent f326b41a08
commit b98d8d003c
6 changed files with 60 additions and 16 deletions

View file

@ -106,7 +106,7 @@
// listen to. Simpler still: fire htmx.trigger on the well-known
// panels. We use the simple path.
['#dash-header-container', '#log-panel .panel-body',
'#indicators-body'].forEach(function (sel) {
'#indicators-body', '#log-content'].forEach(function (sel) {
var el = document.querySelector(sel);
if (el && window.htmx) window.htmx.trigger(el, 'tone-changed');
});

View file

@ -25,7 +25,7 @@
<article id="log-content"
class="log-page__content"
hx-get="/api/log/by-date/{{ selected_iso }}?as=html"
hx-trigger="load"
hx-trigger="load, tone-changed"
hx-swap="innerHTML">
<div class="empty">loading log…</div>
</article>

View file

@ -30,7 +30,12 @@
<tbody>
{% for q in quotes %}
{% set is_stale = stale_symbols and q.symbol in stale_symbols %}
<tr class="{% if is_stale %}row-stale{% endif %}">
{# Stale rows (last observation older than the group's freshness
threshold) are hidden from the default UI but the server still
computes them — remove the `{% if not is_stale %}` guard to
resurface the dimmed row + stale tag. #}
{% if not is_stale %}
<tr>
{% set tip = notes.get(q.symbol, '') if notes else '' %}
{# Long Eurostat ('dataset?...') and ONS ('topic/.../cdid/dataset') symbols
get truncated for display; hover shows the full identifier via title.
@ -39,7 +44,7 @@
{% if '?' in short_sym %}{% set short_sym = short_sym.split('?')[0] %}{% endif %}
{% if '/' in short_sym %}{% set short_sym = short_sym.split('/')[-2] | upper %}{% endif %}
<td class="label has-tip" title="{{ q.symbol }}{% if tip %} — {{ tip }}{% endif %}">
{{ short_sym }}{% if is_stale %} <span class="stale-tag" title="last observation older than 90 days">stale</span>{% endif %}
{{ short_sym }}
</td>
<td {% if tip %}title="{{ tip }}"{% endif %}>{{ q.label or "" }}</td>
<td class="num">{{ q.price | price }}</td>
@ -58,6 +63,7 @@
{% endif %}
<td class="neu">{{ q.as_of or "" }}</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>