May one open or close a folding table or folding chair on Shabbos?
It is forbidden on Shabbos to create a roofing or hovering due to the Ohel prohibition. Nevertheless, the extremity of this prohibition is only in a case that the intent of the hovering is to protect a person from a certain matter, such as to protect from rain or from the sun and light, and the like. If, however, the intent of the hovering is not to give protection for people under it, then it may be made on Shabbos under certain conditions, such as if it was pre-attached to its legs/walls before Shabbos, or does not have any walls under it, or is made with an irregularity. Practically, due to these reasons, it is permitted on Shabbos to open and close a folding chair and folding table without restriction, and doing so does not pose a prohibition of Ohel, or any other prohibition. This applies to all forms of folding tables and chairs, even if they form a wall [i.e. box] under them.
If the table/chair surface is not attached to its legs: In the event that the table surface is not attached to the leg frame, and one needs to open the legs and then rest the table on it, then the following is the law: It is permitted to be done on Shabbos without restriction so long as the legs do not form into walls, and one does not actually attach the table surface to the frame using sockets and the like, but simply rests it upon the frame. The same applies if the cusion area of a chair came off, it is nevertheless permitted to rest it onto the leg frame so long as one does not fasten it to the frame. In all these cases, one may likewise remove the table and cushion from the leg frame so long as it is not firmly attached.
It is permitted on Shabbos to open and close folding chairs and folding tables without restriction. It is also permitted to rest a seat cushion or table surface onto its leg frame so long as one does not fasten it to the frame.
 Admur 315:1; Michaber 315:1; Shabbos 125b
 Admur ibid “It is forbidden to make a tent, which refers to [any] roofing which hovers over a person in order to guard him from a given matter, such as [to protect him] from the sun or from the rain or from another given matter.”
 Admur 315:9 “A temporary roof which one does not intend in making it for it to be a tent to hover over what is underneath it, but rather only in order to use [this roof] for a certain use, such as for example placing the board of a table on its legs, then even though in doing so one makes a temporary roof this does not pose a problem being that one has no intent to make a tent. Nevertheless, if one also places temporary walls under this roof, then this is similar to a tent and is forbidden to be done in its normal form which is [starting] from below to above, and rather [must be done from] above to below [which is] an irregular form.”; Michaber 315:3 as explained in M”A 315:7; M”B 315:17-19
 Admur 315:13 “Any temporary tent which one has no intention into making into a tent [the Sages] only prohibited spreading over walls which one [had already] set up under it on Shabbos if the roofing had not been attached on its walls from before Shabbos. However, if [the roofing] had already been attached to them from before Shabbos but it was placed there folded, then it is permitted to spread it out and set it up on Shabbos. For example a chair made from individual parts and when one wants to sit on it one opens it and spreads and stretches the leather [seating] and when one removes [the seat] he closes it up and has the leather fold, then it is permitted to initially open it on Shabbos even if it has walls under it.”; Michaber 315:5; Tur 315; Shabbos 138a as explains Tosafus; Piskeiy Teshuvos 315:7 [old] 11 [new]; Biur Halacha 315:5 “Kisei” regarding a folding bed
The reason: The reason for this is because it is not similar to making a tent, as one is not doing anything, as the roofing was already set up and prepared together with the walls from before Shabbos and it’s just that one unfolds it on Shabbos and sits on it. [Admur ibid; M”A 315:8] Furthermore, typical folding chairs and tables do not contain actual walls under their roofing and hence are permitted to be set up on Shabbos, even if they are not reattached
 See Admur ibid in previous footnote
 See Admur 315:9 brought in previous footnotes that if there are no walls under the table, there is no Ohel prohibition to place the table surface onto it; Piskeiy Teshuvos 315:11
 This is due to the prohibition of Tikkun Keli.
 Piskeiy Teshuvos 315:11