Idea detail
barrel_page
reqlan rq/extension/host/features-commands.rq:104
Summary
When a `.rq` page grows large, barrel it into a container: create one sibling file per top-level idea, import those files into the current page, and replace the page body with a single container idea whose name the user chooses ( default: the sanitized file basename ).
Same-file sibling refs are rewritten to qualified imports in the child files. Existing page imports are copied into each child. Top-level ideasets are preserved in the container file.
Behaviour lives in analytical_package and is exposed via cli / commands ( `reqlan barrel` ).
Extension: file-level source code action **Barrel page into container … ** and command palette **Barrel Page** ( `reqlan.barrelPage` ) prompt for the container name, confirm, then create child files and rewrite the active page via WorkspaceEdit.
Related: file_based_code_actions decompose
Navigation
Attributes
| Key | Value |
|---|---|
| implementation | barrel-page.ts, barrel.ts, main.ts, reqlan-code-action-provider.ts, code_actions.rs, register-barrel-page-command.ts, barrel-page-apply.ts, package.json |
| status | done |
| tests | barrel-page.test.ts:creates one child file per idea and a container defaulting to file basename, barrel-page.test.ts:writes child files and replaces the source with a container, code-actions.test.ts:offers barrel page source action when the file has top-level ideas, code-actions.test.ts:omits barrel page when only quickfix is requested or there are no ideas, code_actions.rs:offers_barrel_page_source_action_when_the_file_has_top_level_ideas, code_actions.rs:omits_barrel_page_when_only_quickfix_is_requested_or_there_are_no_ideas, barrel-page-apply.test.ts:maps child file names next to the source path, barrel-page-apply.test.ts:detects overwrite conflicts and source-self collision |
Ancestor context
No ancestor chain recorded.
Outbound references
Inbound references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | commands | reqlan rq/cli/cli_package.rq | barrel_page |
| references | command_palette | reqlan rq/extension/host/features-commands.rq | barrel_page |
| references | file_based_code_actions | reqlan rq/extension/host/features-commands.rq | barrel_page |
| references | code_actions | reqlan rq/extension/language/vsc-primitives.rq | barrel_page |
Unresolved references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| None | |||
Local graph
Initialising graph…