Skip to content

Conversation

@buckhalt
Copy link
Member

Implementation details:

  • To activate the new features, you must set the participantEncryption flag by manually editing the protocol.json and adding the following:
  "experiments": {
    "participantEncryption": true
  },
  • Encrypted variables will be exported with the value "Encrypted".
  • Refreshing the browser will cause the passphrase to be lost. The participant will be prompted to re-enter it.
  • Entering an incorrect passphrase is detectable, and the participant will be prompted to re-enter the passphrase.
  • It is possible for the researcher to browse the interview without knowing the passphrase.

Known limitations:

  • Attributes other than "name" are not fully supported for encryption. You can mark them as encrypted, and this will be handled by the network reducer when a node is created. However, name interpreter interfaces will not correctly decode them.
  • If the participant creates nodes with multiple passphrases (for example, if they refresh the window on a different name generator and then re-enter a different passphrase before creating more nodes), the app has no way to detect this. Displaying nodes created with different passphrases on the same interface will result in some portion of the nodes not rendering their label.
  • External rosters using encrypted attributes are not supported. However, nodes created on roster interfaces will correctly encrypt name variables, if they match with an encrypted variable in the codebook.
  • The preview mode feature is not working in Architect 7.0.0 alpha, and likely won't for a long time. This is because the desktop Interviewer app does not support schema 8 at this time.
  • Migrations from schema 7 to schema 8 may not be working correctly for all protocols, but should be working generally. Remember that you will also need to add the flag manually to enable the anonymisation interface.

TODO:

  • All v7 protocols must be migrated to v8 so that db extension that parses JSON won't crash

Swap the BFS-based layoutFamilyTree engine and manual EdgeRenderer SVG
geometry for the kinship2-ported alignPedigree + computeConnectors
pipeline. A new pedigreeAdapter module bridges the store's Map-based
data model and the library's array-based PedigreeInput format.
Convert solveQP from CJS require to ESM import for Vite/browser
compatibility. Add quadprog type declaration. Gracefully fall back to
unoptimized positions when the QP solver fails with inconsistent
constraints. Add Storybook stories for visual evaluation of pedigree
layouts.
The R code uses nid > 0 to identify valid entries (1-based indices).
The TS port uses 0-based indices, so person 0 has nid = 0, which is
indistinguishable from the empty sentinel. This caused missing QP
variable assignments and contradictory constraints (e.g. pos[k] <= -1
vs pos[k] >= 0), triggering "constraints are inconsistent" errors.

Fix by using position-based checks (j < n[lev]) instead of value-based
checks (nid > 0), since entries are always packed left-to-right.
…e story

Fix the same nid > 0 bug from alignped4 in two more locations:
- connectors.ts: person 0 was excluded from duplicate arc detection
- scaling.ts: person 0 was excluded from x-range computation

Also fix twin detection sentinel in alignPedigree.ts (use -1 instead
of 0 so person index 0 is distinguishable from "no parent connection").

Add ComplexMultiGenerational storybook story with 5 generations,
ex-partners at two levels, half-siblings, and cousins.
The require() call in autohint.ts failed because Vite/Node.js cannot
resolve ~/path aliases via require(). This caused autohint to crash
silently, falling back to sequential ordering without spouse hints,
which prevented proper sibling ordering at merge boundaries and
resulted in duplicate node appearances (e.g. father shown twice).

Replaced the require() lazy import with a layoutFn callback parameter
that alignPedigree passes when calling autohint, breaking the circular
dependency cleanly.
… story

FamilyTreeShells hydration was reading sex only from stage metadata,
defaulting to 'female' when metadata was missing. This caused all parent
edges to go to motherIndex, breaking the layout with "only one parent"
warnings.

Now reads sex from node.attributes[nodeSexVariable] first (the primary
source), falling back to metadata then 'female'. This matches how
FamilyTreeProvider initializes the store.

Added SimulatedHydration story to test the Redux hydration code path.
The pedigree layout uses 1-based levels (from R kinship2), so generation
0 is always empty and actual data starts at generation 1. This caused
200px top spacing (1 * rowHeight).

Added y-normalization to pedigreeLayoutToPositions and buildConnectorData
to shift all y coordinates so the topmost generation starts at y=0.
Twin set IDs were set to Math.min(id1, id2), so if person 0 was a twin,
the set ID would be 0. But the sentinel for "not in a twin set" was also
0, causing person 0's twin set to be skipped.

Changed sentinel from 0 to -1, and updated checks from "> 0" to ">= 0".
adds ability to create ex partners and select which existing network member the person is an ex partner of, name both parents if there are multiple possible parents, remove automatic creation of ex partners, add tests to cover this behavior
remove ex-partner from Relationship tyope, replace hasParentExPartner with hasParentWithMultiplePartners, add hasGrandparentWithMultiplePartners for half-aunt/uncle support, add additional partner option to relationship form, add initial setup fields for parents additional partners, half-sibling options only available when parent has 2+ partners, remove exPartnerPairs tracking from pedigreeADapter, update tests/storybook for new terminology
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants