Skip to content

Studio leaks cross-field facts into the vote list (field isolation) #3

Description

@febuz

Bug (owner-reported): in the Studio, selecting intelfield or ledgerfield still shows FinField facts to vote on — e.g. AAPL US · us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax and AAPL US · us-gaap:Assets. Facts from one field must be hidden in another field's feed — at ChemField you don't expect FinField or LedgerField facts either. The field tag must actually filter, not just decorate.

Root cause (web/studio/fin-engine.js): wireStudio() seeds #verify-list with all seeded facts + all terms across every field (seedFacts/seedTerms) and appends every row unconditionally. setField() only toggles the button .on state and the #propose-section visibility — it never filters the verify list by currentField. So every field shows finfield's AAPL facts.

Fix (surgical):

  1. In votableRow(...) tag the row: row.dataset.field = item.field;
  2. In setField(field) add, after setting currentField:
    let shown = 0;
    for (const r of document.querySelectorAll('#verify-list .vrow')) {
      const on = r.dataset.field === field; r.hidden = !on; shown += on;
    }
    document.getElementById('verify-empty')?.remove();
    if (!shown) .insertAdjacentHTML('beforeend',
      '<p id="verify-empty" class="dim">nothing to verify in '+field+' yet — knit a term above.</p>');
  3. prependVotable already uses currentField for new items — good; ensure a newly-knitted item in a non-active field is hidden too (it won't be, since you only knit into the active field).

Deeper (durable): consider a field_of(record) helper (kind→field: finfact-record/finfield-* → finfield) in finknit so every consumer — studio, feed readers, the 3D graph — filters by field the same way. Each field is its own domain knitweb; a fact woven into finfield should never appear in another field's web.

Verified against the deployed studio at https://finfield.github.io/web/studio/ and the source on the fin-studio branch.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions