Changeset fcd6964 in Klonkt for src/views


Ignore:
Timestamp:
07/24/2026 08:59:51 PM (7 weeks ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
c6185fa
Parents:
3ffbedd
Message:

Guardianship: ward ziet z'n guardians, PWA-assets no-cache, handle-fix

De handshake commit werkte al aan beide kanten (geverifieerd live: sound-fabrics
ziet beta als ward, beta weet dat sound-fabrics guardian is), maar het TONEN
ontbrak op drie plekken. Dit lost de Klonkt-kant op.

  1. Ward-kant: in Berichten ziet een ward nu wie z'n guardians zijn (committed relaties, FEP-633c §2). Die view bestond nog niet.
  2. other_handle bewaarde per ongeluk de FEP-escalatiehandle (candidate/inbox) i.p.v. de @handle, dus overal waar we het toonden kwam een inbox-URL uit. Nu de echte @handle uit de offer; display self-healt oude rijen door @user@host uit de actor-URI af te leiden als de opgeslagen handle geen @ is.
  3. Guardian PWA-assets via /guardian/app.js|css met Cache-Control: no-cache, dus een update wordt nooit meer gemaskeerd door de 1-jaar /assets-cache of een vastgelopen install (dat was de "niks werkt na deploy"-bug). Client zit nu in try/catch met een zichtbare foutbanner i.p.v. stil te hangen.

Changed files:
src/services/guardianship/handshake.js

  • applyCommitLocally schrijft de @handle (offer.ward/candidate_handle) naar other_handle

src/routes/posts.js

  • messages-route levert myGuardians (committed guardians met afgeleide @handle)

src/views/pages/messages.ejs

  • "Jouw guardians"-sectie voor de ward

src/services/i18n.js

  • msg.guardians_label (nl/en/de)

src/routes/guardian.js

  • /guardian/app.js|css no-cache; ASSET_V-mtime-machinerie weg

src/assets/js/guardian.js

  • hele client in try/catch met zichtbare foutbanner; handleOf vertrouwt alleen echte @handles

src/views/pages/guardian.ejs

  • assets via no-cache routes i.p.v. /assets?v=

test/guardianship.test.js

  • assert dat other_handle de @handle is na commit

remarks: getest met npm test (6/6). sound-fabrics (stable-lane, handmatig) bewust
niet aangeraakt; wacht op akkoord.

-robo
Co-Authored-By: Claude Opus 4.8 <noreply@…>

Location:
src/views/pages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/guardian.ejs

    r3ffbedd rfcd6964  
    88  <link rel="icon" href="/guardian/icon.svg" type="image/svg+xml">
    99  <meta name="theme-color" content="#ff6b35">
    10   <link rel="stylesheet" href="/assets/css/guardian.css?v=<%= assetV.css %>">
     10  <link rel="stylesheet" href="/guardian/app.css">
    1111</head>
    1212<body>
     
    7777
    7878  <script type="application/json" id="guardian-state"><%- JSON.stringify(state) %></script>
    79   <script src="/assets/js/guardian.js?v=<%= assetV.js %>" defer></script>
     79  <script src="/guardian/app.js" defer></script>
    8080</body>
    8181</html>
  • src/views/pages/messages.ejs

    r3ffbedd rfcd6964  
    2424  <% } %>
    2525
     26  <%# FEP-633c §2: the ward always sees who guards it (committed relations). %>
     27  <% if (typeof myGuardians !== 'undefined' && myGuardians.length) { %>
     28    <div class="alert" style="display:flex;align-items:center;gap:12px;flex-wrap:wrap;border-left:3px solid #35a2ff;">
     29      <span style="font-size:1.4em;">&#128737;</span>
     30      <div style="flex:1;min-width:200px;">
     31        <strong><%= t('msg.guardians_label') %></strong><br>
     32        <span><%= myGuardians.map(function(g){ return g.handle; }).join(', ') %></span>
     33      </div>
     34    </div>
     35  <% } %>
     36
    2637  <div class="msg-filters" role="tablist" aria-label="<%= t('msg.title') %>">
    2738    <button type="button" class="msg-chip is-on" data-show="all"><%= t('msg.filter_all') %></button>
Note: See TracChangeset for help on using the changeset viewer.