Yusuf Suleman 6cff4a9036
All checks were successful
Security Checks / dependency-audit (push) Successful in 14s
Security Checks / secret-scanning (push) Successful in 4s
Security Checks / dockerfile-lint (push) Successful in 4s
fix: scroll mark-as-read — move all tracking to per-row GeometryReader
ROOT CAUSE (confirmed by instrumentation):
1. viewportHeight was 0 — background GeometryReader onAppear fired
   before ScrollView layout, never updated. Visibility ratio was
   always 0.00, so wasVisible was never populated.
2. cumulativeDown was 0 — PreferenceKey + onPreferenceChange on the
   zero-height anchor never delivered scroll offset updates.
3. Both tracking mechanisms were dead. Only per-row onChange fired.

FIX: Removed dead PreferenceKey scroll tracker and dead viewport
background GeometryReader. All tracking now lives in the per-row
GeometryReader onChange(of: frame.minY), which the logs confirmed
fires reliably:

- Scroll direction: computed from delta between current and previous
  minY for each entry (stored in lastKnownMinY dictionary)
- Cumulative scroll: accumulated from positive deltas (>2pt filter)
- Activation: requires cumulative downward scroll > threshold
- Visibility: computed using UIScreen.main.bounds.height (reliable,
  doesn't depend on layout timing)
- Mark condition: trackingActive + moving down + unread + was visible
  + maxY < 0 (fully above viewport)

Navigation protection preserved: onAppear resets trackingActive,
cumulativeDown, and lastKnownMinY.

Removed debug instrumentation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 00:06:24 -05:00

Gitea CI Workflows

security.yml

Runs on push/PR to master. Three jobs:

  1. dependency-auditnpm audit --audit-level=high for budget and frontend
  2. secret-scanning — checks for tracked .env/.db files and hardcoded secret patterns
  3. dockerfile-lint — verifies all Dockerfiles have USER (non-root) and HEALTHCHECK

Runner Setup

The runner is configured in the Gitea docker-compose at /media/yusiboyz/Media/Scripts/gitea/docker-compose.yml.

What was done:

  1. Added [actions] ENABLED = true to Gitea's app.ini
  2. Added runner service (gitea/act_runner) to Gitea's docker-compose
  3. Generated runner token via docker exec -u git gitea gitea actions generate-runner-token
  4. Token stored in /media/yusiboyz/Media/Scripts/gitea/.env as RUNNER_TOKEN
  5. Runner registered as platform-runner with labels: ubuntu-latest, ubuntu-24.04, ubuntu-22.04

To regenerate token (if needed):

cd /media/yusiboyz/Media/Scripts/gitea
docker exec -u git gitea gitea actions generate-runner-token
# Update .env with new RUNNER_TOKEN value
docker compose up -d runner

To check runner status:

docker logs gitea-runner
Description
Second Brain Platform - Dashboard, Fitness, Budget, Inventory, Trips, Reader, Media
Readme 31 MiB
Languages
Svelte 51.2%
Python 24.2%
Swift 13.5%
JavaScript 5.4%
TypeScript 3.3%
Other 2.4%