@@ -14,7 +14,6 @@ import {
1414 type LucideIcon ,
1515 NetworkIcon ,
1616 NotebookPenIcon ,
17- ScrollTextIcon ,
1817 SquareDashedBottomCodeIcon ,
1918 TextSearchIcon ,
2019 XCircleIcon ,
@@ -48,13 +47,29 @@ export interface PanelDescriptor {
4847 position : "sidebar" | "footer" ;
4948}
5049
50+ /* Panels are ordered in roughly decreasing order of importance as well as
51+ * logically grouped.
52+ *
53+ * 1. Must-have panels first.
54+ * 2. Panels that can add cells to the editor.
55+ * 3. Nice-to-have observability panels.
56+ */
5157export const PANELS : PanelDescriptor [ ] = [
58+ // 1. Must-have panels.
59+ //
60+ // The files panel is at the top to orient
61+ // users within their filesystem and give
62+ // them a quick glance at their project structure,
63+ // without having to leave their editor.
5264 {
5365 type : "files" ,
5466 Icon : FolderTreeIcon ,
5567 tooltip : "View files" ,
5668 position : "sidebar" ,
5769 } ,
70+ // Because notebooks uniquely have data in RAM,
71+ // it's important to give humans visibility into
72+ // what that data is.
5873 {
5974 type : "variables" ,
6075 Icon : FunctionSquareIcon ,
@@ -67,44 +82,57 @@ export const PANELS: PanelDescriptor[] = [
6782 tooltip : "Explore data sources" ,
6883 position : "sidebar" ,
6984 } ,
70- {
71- type : "dependencies" ,
72- Icon : NetworkIcon ,
73- tooltip : "Explore dependencies" ,
74- position : "sidebar" ,
75- } ,
85+ // Every notebook has a package environment that must
86+ // be managed.
7687 {
7788 type : "packages" ,
7889 Icon : BoxIcon ,
7990 tooltip : "Manage packages" ,
8091 position : "sidebar" ,
8192 } ,
82- {
83- type : "cache" ,
84- Icon : DatabaseZapIcon ,
85- tooltip : "Manage cache" ,
86- position : "sidebar" ,
87- hidden : ! getFeatureFlag ( "cache_panel" ) ,
88- } ,
89- {
90- type : "outline" ,
91- Icon : ScrollTextIcon ,
92- tooltip : "View outline" ,
93- position : "sidebar" ,
94- } ,
93+ // 2. "Add cells" panels.
94+ //
95+ // We start with chat because it's the easiest
96+ // way to add new cells to the editor.
9597 {
9698 type : "chat" ,
9799 Icon : BotMessageSquareIcon ,
98100 tooltip : "Chat with AI" ,
99101 position : "sidebar" ,
100102 } ,
101103 {
104+ // TODO(akshayka): Consider merging with chat panel
105+ // before release.
102106 type : "agents" ,
103107 Icon : HatGlassesIcon ,
104108 tooltip : "Agents" ,
105109 position : "sidebar" ,
106110 hidden : ! getFeatureFlag ( "external_agents" ) ,
107111 } ,
112+ // Scratchpad is the only way users can
113+ // code without DAG restrictions, so it is
114+ // privileged.
115+ {
116+ type : "scratchpad" ,
117+ Icon : NotebookPenIcon ,
118+ tooltip : "Scratchpad" ,
119+ position : "sidebar" ,
120+ } ,
121+ {
122+ // TODO(akshayka): Consider making snippets default
123+ // off, user configuration to enable.
124+ type : "snippets" ,
125+ Icon : SquareDashedBottomCodeIcon ,
126+ tooltip : "Snippets" ,
127+ position : "sidebar" ,
128+ } ,
129+ // 3. Nice-to-have observability panels.
130+ //
131+ // Utility panels that provide observability
132+ // into the state or structure of the notebook. These
133+ // observability panels are less crucial than variables
134+ // or datasets, so they are positioned at the end of the
135+ // sidebar.
108136 {
109137 type : "documentation" ,
110138 Icon : TextSearchIcon ,
@@ -118,15 +146,18 @@ export const PANELS: PanelDescriptor[] = [
118146 position : "sidebar" ,
119147 } ,
120148 {
121- type : "tracing" ,
122- Icon : ActivityIcon ,
123- tooltip : "Tracing" ,
149+ // TODO(akshayka): Consider making dependencies
150+ // default off; the minimap is a more effective
151+ // overview.
152+ type : "dependencies" ,
153+ Icon : NetworkIcon ,
154+ tooltip : "Explore dependencies" ,
124155 position : "sidebar" ,
125156 } ,
126157 {
127- type : "snippets " ,
128- Icon : SquareDashedBottomCodeIcon ,
129- tooltip : "Snippets " ,
158+ type : "tracing " ,
159+ Icon : ActivityIcon ,
160+ tooltip : "Tracing " ,
130161 position : "sidebar" ,
131162 } ,
132163 {
@@ -137,11 +168,15 @@ export const PANELS: PanelDescriptor[] = [
137168 hidden : isWasm ( ) ,
138169 position : "sidebar" ,
139170 } ,
171+ // TODO(akshayka): The cache panel should not be default shown,
172+ // even when it's out of feature flag. (User config to
173+ // turn it on.)
140174 {
141- type : "scratchpad " ,
142- Icon : NotebookPenIcon ,
143- tooltip : "Scratchpad " ,
175+ type : "cache " ,
176+ Icon : DatabaseZapIcon ,
177+ tooltip : "Manage cache " ,
144178 position : "sidebar" ,
179+ hidden : ! getFeatureFlag ( "cache_panel" ) ,
145180 } ,
146181 {
147182 type : "errors" ,
0 commit comments