pf_app
Go to file
Paul Trowbridge 0520e5e542 Wait for the viewer's table before re-applying row depth on refocus
The instrumentation showed the re-apply mostly throwing "No table set": the
viewer is detached from its table for a while after a refocus, the fixed
60ms delay fired inside that window, set_depth threw, and the tree rendered
fully expanded. The handful of times the delay happened to be long enough,
the log reads "re-apply done depth=0" and the collapse survived.

So poll for the table instead of guessing, up to 5s. queued now clears in a
finally after the work rather than at the top of the callback, so the focus
and visibilitychange that both fire for one window switch no longer each
run a re-apply -- that was the doubled applyDepth in the log.

Does not address per-node +/- collapse, which is still not recorded at all:
expandDepthRef stays null because only the toolbar buttons set it, and the
view exposes expand()/collapse() with no getter to read the state back.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-16 22:26:46 -04:00
lib Hash pf_gkey instead of shipping the concatenated grain tuple 2026-09-16 22:07:29 -04:00
public Add UX mockup and update spec with navigation direction 2026-04-25 14:56:29 -04:00
routes Merge feature/static-grain: display-grain pre-aggregation 2026-09-16 18:08:20 -04:00
setup_sql Merge feature/static-grain: display-grain pre-aggregation 2026-09-16 18:08:20 -04:00
ui Wait for the viewer's table before re-applying row depth on refocus 2026-09-16 22:26:46 -04:00
.env.example Put the app behind a login 2026-09-14 22:20:25 -04:00
.gitignore Refresh lockfiles and keep .env backups out of the tree 2026-09-16 17:45:58 -04:00
CLAUDE.md Merge feature/static-grain: display-grain pre-aggregation 2026-09-16 18:08:20 -04:00
install.sh Put the app behind a login 2026-09-14 22:20:25 -04:00
package-lock.json Refresh lockfiles and keep .env backups out of the tree 2026-09-16 17:45:58 -04:00
package.json Put the app behind a login 2026-09-14 22:20:25 -04:00
PERSPECTIVE.md Load Perspective from bundle, not CDN; pin all packages at 5.2.0 2026-08-17 21:30:19 -04:00
pf_perspective_options.md Record DuckDB virtual-server spike findings; choose display-grain pre-aggregation 2026-08-17 21:47:55 -04:00
pf_spec.md Merge feature/static-grain: display-grain pre-aggregation 2026-09-16 18:08:20 -04:00
pf.sh Put the app behind a login 2026-09-14 22:20:25 -04:00
server.js Put the app behind a login 2026-09-14 22:20:25 -04:00