Skip to content

Enable cross-page sheet references and suggestion UX - #9

Merged
2witstudios merged 1 commit into
codex/add-sheets-page-type-with-calculationsfrom
codex/add-cross-page-reference-support
Sep 24, 2025
Merged

2witstudios merged 1 commit into
codex/add-sheets-page-type-with-calculationsfrom
codex/add-cross-page-reference-support

Conversation

@2witstudios

Copy link
Copy Markdown
Owner

Summary

  • extend the sheet core to parse and evaluate cross-page references while tracking external dependencies
  • add tests and UI wiring to load referenced sheets, resolve duplicates, and expose mention-driven formula entry
  • update suggestion utilities and positioning helpers to support input fields and optional trailing spaces

Testing

  • pnpm --filter @pagespace/lib test

https://chatgpt.com/codex/tasks/task_e_68d423871cf88320bb76531e99151135

@2witstudios
2witstudios merged commit 3d07e66 into codex/add-sheets-page-type-with-calculations Sep 24, 2025

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +239 to +264
useEffect(() => {
setExternalSheets((prev) => {
const next: Record<string, ExternalSheetState> = {};
let changed = false;

for (const reference of externalReferences) {
if (prev[reference.raw]) {
next[reference.raw] = prev[reference.raw];
} else {
changed = true;
}
}

if (!changed && Object.keys(next).length === Object.keys(prev).length) {
return prev;
}

return next;
});
}, [externalReferences]);

useEffect(() => {
externalReferences.forEach((reference) => {
const existing = externalSheets[reference.raw];
if (existing && (existing.status === 'loading' || existing.status === 'ready')) {
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Load external sheets recursively to resolve nested references

External sheets are fetched only for tokens returned by collectExternalReferences(sheet) on the local sheet, but evaluation (evaluateSheet) can traverse formulas in those external sheets and request further resolveExternalReference lookups. Because externalReferences and the fetch effect here never expand to references discovered inside already loaded sheets, any transitive reference (e.g., A references B and B references C) will always yield "Referenced page \"C\" is loading" and never trigger a fetch for page C. This means nested cross‑page formulas cannot ever evaluate successfully even after the initial external sheet loads.

Useful? React with 👍 / 👎.

@2witstudios
2witstudios deleted the codex/add-cross-page-reference-support branch October 17, 2025 19:57
2witstudios added a commit that referenced this pull request Apr 10, 2026
Update for #865 (Redis export rate limit), #866 (activity log PII
exclusion), #867 (activity chain serialization), #868-870 (audit
service wiring), #863 (GDPR cron jobs), #861 (password auth removed).

Fix code review comments: AI usage log deletion is explicit call not
FK cascade; note shared-page assistant messages survive account
deletion; resolve P2 #8 and #9 contradictions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2witstudios added a commit that referenced this pull request Apr 10, 2026
* docs: update compliance doc and prototype panes to reflect implemented fixes

DSAR export, message hard-delete, AI log purge on account deletion, and
audit chain verification are now implemented — update stale gap claims.
Note in-progress work on pu/hash-chain-pii and pu/export-rate-limit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: reflect merged PRs and fix stale review comments

Update for #865 (Redis export rate limit), #866 (activity log PII
exclusion), #867 (activity chain serialization), #868-870 (audit
service wiring), #863 (GDPR cron jobs), #861 (password auth removed).

Fix code review comments: AI usage log deletion is explicit call not
FK cascade; note shared-page assistant messages survive account
deletion; resolve P2 #8 and #9 contradictions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: fix stale password auth reference, add userId:null caveat

Section 7.1 referenced "local email+password auth" — password auth was
removed in #861; on-prem now uses magic links + passkeys. GdprPane
message deletion cards now note shared-page assistant messages with
userId: null may survive account deletion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(prototype): restructure panes so resolved items live in Current

Resolved items were sitting in Gaps/End Game with "Fixed"/"Done" labels,
breaking the narrative flow. Now:
- Current: hash chain integrity, distributed rate limit, message
  hard-delete all live in their natural subsections
- Gaps: only genuine gaps remain (cookie consent, data residency,
  SIEM, audit coverage, agent trails)
- End Game: only future work (no "Done" items cluttering the roadmap)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant