vialfile

Current stack

Define what you're running today — 2 to 4 peptides with start dates and doses. Mark one stack active and the calculator, injection log, and bloodwork pages will auto-default from it. The four log pages keep their own data; the stack is just a metadata layer pointing at "this is what's current."

Peptides in this stack (2–4)

No stacks yet. Define your first stack above and mark it active.

What "active" does

  1. Calculator — when you select a peptide that's in your active stack, a "in your current stack — started date, nd ago" line appears above the source links. Confirms you're still on the protocol you set.
  2. Injection log — the peptide dropdown defaults to your active stack's first item (instead of the empty placeholder). Saves a click on every entry.
  3. Bloodwork cadence — the "logged injections without bloodwork protocols" suggestion list also includes peptides from your active stack you haven't started a protocol on yet. Catches the gap between "I'm running this" and "I have a draw schedule for it."

All three integrations are read-only. None of them write back to vialfile-stack-v1. If your active stack is malformed or empty, the three pages fall back to their existing behavior — no breakage.

Stack FAQ

What's the "Bloodwork soon: …" line above the saved stacks list?

A one-line preview of the 1–2 closest-due bloodwork draws across all your protocols, sourced read-only from vialfile-bloodwork-v1. Overdue draws come first (sorted by ascending days-until), then upcoming. The phrase format ("BPC-157 12d overdue", "IGF-1 today", "TSH in 5d") matches the "Next: …" header at the top of the /digest.html bloodwork section byte-for-byte — same shared label builder, so the two surfaces never drift. The line shows draws inside a 4-week window and hides when no protocols fall in that window. Designed for the moment you're picking the next dose-day on this page and want a glance at upcoming bloodwork without alt-tabbing.

What's the "Inventory: …" line under each stack card?

A per-stack supply hand-warning. When any peptide in the stack is below the 14-day supply threshold (status running-out <7d or low ≥7d &<14d), a one-line cue surfaces under the items list — e.g. Inventory: BPC-157 running out (5d) · TB-500 (TB4) low (12d). Up to three peptides surface (most-urgent first by ascending days-of-supply, ties broken alphabetically). The line is sourced read-only from vialfile-inventory-v1 + vialfile-log-v1 via the same computeBurnRate helper that powers /inventory.html and the /digest.html top-of-page banner — single source of truth, so the wording mirrors the per-row INVENTORY pills on the digest byte-for-byte. The per-stack scope means even a non-active saved stack surfaces its own supply state (useful when comparing two cycle plans before flipping active). Hidden when no stack peptide qualifies, so the line never reads as a false-positive.

What's the "Logged 5x in last 7 days" line under each peptide row?

A per-peptide adherence cue. For each row in a saved stack, we count how many valid log entries you've recorded for that peptide in the last 7 days — sourced read-only from vialfile-log-v1. The line surfaces as Logged 5x in last 7 days directly under the dose / start-date meta. Hidden when the count is zero — the protocol planner shouldn't shame you for unstarted protocols, and the cards stay clean. The 7-day window is the "is this stack actually current?" question — anything weekly+ shows up; a stack that hasn't fired in 7 days is functionally inactive even if still saved. Filter rule mirrors the calculator's last-dose aside: matching peptideId, parseable timestamp, in the trailing 7-day window, positive dose, valid route — corrupted entries are ignored. Pure projection over your log; never writes to the stack key.

What's the "Bloodwork overdue 12d" line under a peptide row?

A per-peptide overdue cue. When you've added a bloodwork protocol for a peptide on /bloodwork.html and the next-due date has slipped past today, the row in the stack card shows Bloodwork overdue 12d directly under the adherence count — sourced read-only from vialfile-bloodwork-v1. Overdue-only by design: the top-of-page Bloodwork soon: … banner already covers the due-soon case across all protocols (rolled up, sorted by urgency); doubling that here per-row would be UI noise. But a lapsed draw is a safety-first nudge worth repeating right next to where you're planning the next dose. Days are the absolute integer count past today; the line is hidden on rows whose protocol is on-track, due-soon, or due-now (those are covered by the top banner). Pure projection over your bloodwork protocols; never writes to either store.

What's the "Pattern: 3x severity-3+ effects in last 14d (BPC-157, GHK-Cu)" line under a stack card?

A per-card side-effect pattern aside. When you've logged two or more moderate-or-worse side-effects (severity 3, 4, or 5) on /sideeffects.html for peptides in this stack within the trailing 14 days, a warn-tinted line surfaces under the inventory aside — e.g. Pattern: 3x severity-3+ effects in last 14d (BPC-157, GHK-Cu). Sourced read-only from vialfile-sideeffects-v1. Severity gate matches the addEffect validator byte-for-byte (only integers in 1-5; anything below 3 hides as noise). Peptides in the parenthetical are sorted most-frequent first, ties broken alphabetically — so the peptide most-likely contributing to the wave surfaces first. The line is the third "current-state warning" on each card, alongside the inventory low-supply aside and the per-row bloodwork-overdue cue: bloodwork covers test-cadence drift, inventory covers supply gaps, and this one covers the third major signal — your body pushing back. Hidden when the count is below 2 (a single bad day is not a pattern). Pure projection over your side-effect log; never writes to either store.

What's the "Cadence mismatch: …" line above the saved stacks list?

A one-line note that fires when your active stack contains a peptide whose bloodwork protocol cadence (set on /bloodwork.html) differs by 4 or more weeks from what the peptide library recommends. For example, if the library recommends BPC-157 every 12 weeks but you set a 4-week protocol, the banner shows Cadence mismatch: BPC-157 (your 4w, library 12w). This catches the common case of copy-pasting a protocol frequency without double-checking the library's recommendation. Multiple mismatches are listed largest-discrepancy-first. Hidden when no active stack exists, when no protocols have been set up for active-stack peptides, or when all protocol cadences fall within 4 weeks of the library value. Sourced read-only from vialfile-bloodwork-v1 and vialfile-stack-v1. Pure projection — never writes to any store.

What's the "Gap: Xd behind daily cadence" line under a peptide row?

A per-peptide injection-gap cue. For each row in a saved stack, vialfile checks your injection log and compares the time since your last qualifying dose to the peptide's expected dosing interval (daily = 1 day, 2x-weekly = 3.5 days, weekly = 7 days). If the gap is more than 1.5× the expected interval, a warn-tinted line appears — e.g. Gap: 2d behind daily cadence. Hidden when no log entry exists for the peptide (won't shame an unstarted protocol), when the cadence is sub-daily or as-needed (PRN), or when the gap is within the 1.5× threshold. The 1.5× buffer allows for real-life timing flexibility — a daily peptide injected 36 hours after the prior dose is on-track; 37+ hours surfaces the cue. Sourced read-only from vialfile-log-v1. Pure projection — never writes to any store.

What does "7/10 injections at distinct sites — good rotation" mean under a peptide row?

A site-rotation compliance cue (B.39). For each stack peptide with at least 3 logged injections, vialfile counts how many of your recorded injections were at distinct sites vs. how many hit the same site twice or more. Two outputs are possible: 7/10 injections at distinct sites (3 repeats) — good rotation when you're varying sites (green tint), or all 5 at Abdomen — vary injection site when every entry used the same site (amber tint). Sub-cutaneous peptides should be rotated to prevent fibrosis, reduced absorption, and injection-site irritation. Hidden when fewer than 3 log entries exist for the peptide — not enough data to characterize rotation. Sourced read-only from vialfile-log-v1. Pure projection — never writes to any store.

What's the "Last 4 weeks" block under each stack card?

Each saved stack now shows a 4-week retrospective per peptide — a mini-grid of week cells (newest at left), each showing injection count in that week plus mean side-effect severity when you logged any effects. Cells tint by severity using the same palette the side-effect heatmap uses (green → red on the 1–5 scale). It's derived read-only from your injection log and side-effect log — nothing writes to the stack key. This turns the stack card from a plan-only surface into plan + retrospective: did I actually run this the way I intended?

Why a separate "stack" instead of just tagging entries?

Tagging makes every log entry carry stack metadata, which couples your historical log to a current concept that changes every cycle. Keeping stacks separate means the four logs stay clean (one schema each) and you can switch active stacks without rewriting history. The stack layer is auto-prunable; your logs are forever.

How many stacks can I save?

Up to five. When you save a sixth, the oldest by created-at is auto-pruned. The cap exists so the localStorage footprint stays small — typically <2 KB even at the cap. If you need more history, export from the settings page first.

What happens to the active flag when I delete the active stack?

You'll have no active stack until you mark another one. The four cross-surface integrations fall back to their pre-stack defaults — empty dropdown placeholder on the log page, no context line on the calculator, only injection-log-derived suggestions on bloodwork.

Why isn't the stack in the backup file?

The backup file is currently vialfile-backup-v1 with three sections (injections / sideeffects / bloodwork). Stack is metadata, not user data — losing your "current stack" is recoverable in 30 seconds, losing six months of injection logs is not. A future backup version may include stacks; for now, the cross-surface fallbacks make stack data low-stakes.

Where is my stack data stored?

In your browser's localStorage under key vialfile-stack-v1. Clearing site data, switching browsers, or using private mode will erase it. Same privacy model as the other four logs — nothing is sent to a server.