Skip to content

feat(channel): folder-scoped chat export procs - #68

Closed
aaron-tsar wants to merge 1 commit into
testfrom
feat/chat-export-folder-scope-procs
Closed

aaron-tsar wants to merge 1 commit into
testfrom
feat/chat-export-folder-scope-procs

Conversation

@aaron-tsar

Copy link
Copy Markdown
Contributor

Summary

Read-only stored procedures backing the folder-scoped chat PDF/JSON export (paired with server-team + ui-team changes on test).

Changes

  • New channel_export_folder_tree — returns the folder subtree (recursive CTE over media.parent_id) so export groups messages one section per folder; hub-root name resolved from yp.hub.
  • channel_export_messages / channel_export_count — add _root_nid param + subtree scope via metadata._scope_nid; expose scope_nid column; TRIM author fullname.
  • channel_export_file_thread_list — scope to subtree, return containing folder (folder_nid/folder_name), only active files.
  • channel_export_file_thread_messages — TRIM fullname (consistency).

Notes

  • All READ-ONLY (no mark-seen side effects), matching existing export proc contract.
  • Already applied + verified across stage hub DBs.

Add channel_export_folder_tree (subtree folder list for export sections) and
scope channel_export_messages / channel_export_count / channel_export_file_thread_list
to a folder subtree via _root_nid + recursive CTE over media.parent_id. Expose
scope_nid so the service groups messages per folder, TRIM author fullname, and
resolve file-thread filenames with their containing folder.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@aaron-tsar

Copy link
Copy Markdown
Contributor Author

Superseded: các export procs này đã nằm trong PR #45 (feature/per-folder-teamchat-notifications → preview). Export procs đi theo flow preview cùng feature teamchat thay vì test.

@aaron-tsar aaron-tsar closed this Jul 17, 2026
@aaron-tsar
aaron-tsar deleted the feat/chat-export-folder-scope-procs branch July 17, 2026 14:35
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.

1 participant